Try rename before doing copy&delete

This commit is contained in:
Flavio Copes
2017-01-04 16:43:56 +01:00
parent 4331ab374e
commit cc96d160a4

View File

@@ -340,8 +340,11 @@ abstract class Folder
// Make sure that path to the target exists before moving.
self::create(dirname($target));
self::copy($source, $target);
self::delete($source);
$success = @rename($source, $target);
if (!$success) {
self::copy($source, $target);
self::delete($source);
}
// Make sure that the change will be detected when caching.
@touch(dirname($source));