mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
Use the expected method depending on the target being a file or folder
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
This commit is contained in:
parent
d551b8e6fd
commit
713faa0fc0
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