fix creating unique filenames

This commit is contained in:
Robin Appelman 2012-04-16 10:58:40 +02:00
parent fa97c59f95
commit 464c751f30
1 changed files with 4 additions and 1 deletions

View File

@ -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;
}
}