Filemanager: Fix anonymous upload directory always reported failure when uploading

Now it works first time the file is uploaded
This commit is contained in:
nathan 2023-07-25 09:23:06 -06:00
parent 3aaf0b2b60
commit 06af22a46c

View File

@ -1791,7 +1791,6 @@ class filemanager_ui
$path = $info['dirname'] . '/'. $info['filename'] . " ($i)." . $info['extension']; $path = $info['dirname'] . '/'. $info['filename'] . " ($i)." . $info['extension'];
$i++; $i++;
} }
$data['path'] = $path;
break; break;
case 'ask': case 'ask':
default: default:
@ -1811,6 +1810,7 @@ class filemanager_ui
try try
{ {
$data['path'] = $path;
if(Vfs::copy_uploaded($tmp_path, $path, $props, false)) if(Vfs::copy_uploaded($tmp_path, $path, $props, false))
{ {
++$arr['files']; ++$arr['files'];