From 0bc28dcb954e6f1b945ef08b9c8ea9a2df0d6e97 Mon Sep 17 00:00:00 2001 From: Christian Berendt Date: Mon, 8 Jul 2013 11:14:47 +0200 Subject: [PATCH] replaced substr with trim --- apps/files_external/lib/amazons3.php | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/apps/files_external/lib/amazons3.php b/apps/files_external/lib/amazons3.php index c8f85c5015..1c92dfa999 100644 --- a/apps/files_external/lib/amazons3.php +++ b/apps/files_external/lib/amazons3.php @@ -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 = '.';