function getArchiveRel( $suffix = false ) {
$path = 'archive/' . $this->getHashPath();
if ( $suffix === false ) {
- $path = substr( $path, 0, -1 );
+ $path = rtrim( $path, '/' );
} else {
$path .= $suffix;
}
$ext = $this->getExtension();
$path = $this->repo->getZoneUrl( 'public', $ext ) . '/archive/' . $this->getHashPath();
if ( $suffix === false ) {
- $path = substr( $path, 0, -1 );
+ $path = rtrim( $path, '/' );
} else {
$path .= rawurlencode( $suffix );
}
$this->assertRepoDefined();
$path = $this->repo->getVirtualUrl() . '/public/archive/' . $this->getHashPath();
if ( $suffix === false ) {
- $path = substr( $path, 0, -1 );
+ $path = rtrim( $path, '/' );
} else {
$path .= rawurlencode( $suffix );
}