summaryrefslogtreecommitdiffstats
path: root/lib/helper.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/helper.php')
-rwxr-xr-xlib/helper.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/helper.php b/lib/helper.php
index 52278f5c3a2..61a57ec27e3 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,7 +521,7 @@ class OC_Helper {
$counter++;
}
- return $newname;
+ return $newpath;
}
/*