replaced substr with trim

This commit is contained in:
Christian Berendt 2013-07-08 11:14:47 +02:00
parent adf0fe880c
commit 0bc28dcb95
1 changed files with 1 additions and 7 deletions

View File

@ -38,13 +38,7 @@ class AmazonS3 extends \OC\Files\Storage\Common {
private static $tmpFiles = array();
private function normalizePath($path) {
if (substr($path, 0, 1) == '/') {
$path = substr($path, 1);
}
if (substr($path, -1) == '/') {
$path = substr($path, 0, -1);
}
$path = trim($path, '/');
if ( ! $path) {
$path = '.';