Merge pull request #3998 from nextcloud/backport-27032
Use the expected method depending on the target being a file or folder
This commit is contained in:
commit
6e6cbae37c
|
@ -256,7 +256,11 @@ class Trashbin {
|
|||
}
|
||||
|
||||
if ($sourceStorage->file_exists($sourceInternalPath)) { // failed to delete the original file, abort
|
||||
if ($sourceStorage->is_dir($sourceInternalPath)) {
|
||||
$sourceStorage->rmdir($sourceInternalPath);
|
||||
} else {
|
||||
$sourceStorage->unlink($sourceInternalPath);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue