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
1 changed files with 5 additions and 1 deletions
|
@ -256,7 +256,11 @@ class Trashbin {
|
|||
}
|
||||
|
||||
if ($sourceStorage->file_exists($sourceInternalPath)) { // failed to delete the original file, abort
|
||||
$sourceStorage->unlink($sourceInternalPath);
|
||||
if ($sourceStorage->is_dir($sourceInternalPath)) {
|
||||
$sourceStorage->rmdir($sourceInternalPath);
|
||||
} else {
|
||||
$sourceStorage->unlink($sourceInternalPath);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue