diff --git a/lib/helper.php b/lib/helper.php index 412f0e6b76..eed9491776 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; } }