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
|
@ -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 New Issue