diff options
author | Robin Appelman <icewind@owncloud.com> | 2012-04-16 10:58:40 +0200 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2012-04-16 10:58:40 +0200 |
commit | 464c751f30cb65702592f43c0836e343cfe4b40c (patch) | |
tree | 4326d681382c50f51a884ae39d0bac93c513e9ce /lib/helper.php | |
parent | fa97c59f9585cb6da1bd4885a7a9d349e2170b38 (diff) | |
download | nextcloud-server-464c751f30cb65702592f43c0836e343cfe4b40c.tar.gz nextcloud-server-464c751f30cb65702592f43c0836e343cfe4b40c.zip |
fix creating unique filenames
Diffstat (limited to 'lib/helper.php')
-rwxr-xr-x | lib/helper.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/helper.php b/lib/helper.php index 412f0e6b764..eed94917767 100755 --- a/lib/helper.php +++ b/lib/helper.php @@ -502,6 +502,9 @@ class OC_Helper { */ public static function buildNotExistingFileName($path, $filename) { + if($path==='/'){ + $path=''; + } if ($pos = strrpos($filename, '.')) { $name = substr($filename, 0, $pos); $ext = substr($filename, $pos); @@ -518,6 +521,6 @@ class OC_Helper { $counter++; } - return $newname; + return $newpath; } } |