diff options
Diffstat (limited to 'lib/private/Files/View.php')
-rw-r--r-- | lib/private/Files/View.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/private/Files/View.php b/lib/private/Files/View.php index db21d400b39..6ffb5edff3e 100644 --- a/lib/private/Files/View.php +++ b/lib/private/Files/View.php @@ -692,7 +692,11 @@ class View { if ($mount and $mount->getInternalPath($absolutePath) === '') { return $this->removeMount($mount, $absolutePath); } - $result = $this->basicOperation('unlink', $path, array('delete')); + if ($this->is_dir($path)) { + $result = $this->basicOperation('rmdir', $path, ['delete']); + } else { + $result = $this->basicOperation('unlink', $path, ['delete']); + } if (!$result && !$this->file_exists($path)) { //clear ghost files from the cache on delete $storage = $mount->getStorage(); $internalPath = $mount->getInternalPath($absolutePath); |