mirror of
https://github.com/nextcloud/server.git
synced 2024-08-13 14:11:10 +02:00
Fix trash error when deleting files with the same name at the same time (happens in unit tests)
This commit is contained in:
parent
cec43df0f0
commit
a59612752e
@ -167,6 +167,9 @@ class Trashbin {
|
||||
$trashPath = '/files_trashbin/files/' . $filename . '.d' . $timestamp;
|
||||
try {
|
||||
$sizeOfAddedFiles = $view->filesize('/files/' . $file_path);
|
||||
if ($view->file_exists($trashPath)) {
|
||||
$view->unlink($trashPath);
|
||||
}
|
||||
$view->rename('/files/' . $file_path, $trashPath);
|
||||
} catch (\OCA\Files_Trashbin\Exceptions\CopyRecursiveException $e) {
|
||||
$sizeOfAddedFiles = false;
|
||||
|
Loading…
Reference in New Issue
Block a user