Properly check path validity before deleting to trash
This prevents deleting the whole "files" folder of the user whenever $ownerPath is empty. This can happen in concurrency situations.
This commit is contained in:
parent
0655f25406
commit
96d45e90dc
|
@ -204,7 +204,7 @@ class Trashbin {
|
|||
|
||||
$ownerView = new View('/' . $owner);
|
||||
// file has been deleted in between
|
||||
if (!$ownerView->file_exists('/files/' . $ownerPath)) {
|
||||
if (is_null($ownerPath) || $ownerPath === '' || !$ownerView->file_exists('/files/' . $ownerPath)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue