]> source.dussan.org Git - nextcloud-server.git/commitdiff
replaced substr with trim
authorChristian Berendt <berendt@b1-systems.de>
Mon, 8 Jul 2013 09:14:47 +0000 (11:14 +0200)
committerChristian Berendt <berendt@b1-systems.de>
Mon, 8 Jul 2013 09:14:47 +0000 (11:14 +0200)
apps/files_external/lib/amazons3.php

index c8f85c501551d3379b176545978b4312c10e9e3f..1c92dfa9995e994155972398cdb9f08d4f44cae5 100644 (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 = '.';