Merge pull request #3892 from nextcloud/downstream-27101
Redirect unlink to rmdir
This commit is contained in:
commit
26eda9dd58
2 changed files with 293 additions and 254 deletions
|
@ -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);
|
||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue