From 9ddd5033d4649da6e1560434e69ff806fdbf8c11 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Wed, 17 Dec 2014 16:09:28 +0100 Subject: [PATCH 1/2] Movable mountpoints are always deletable --- lib/private/files/view.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/private/files/view.php b/lib/private/files/view.php index c01763cdad..c21ec88ae0 100644 --- a/lib/private/files/view.php +++ b/lib/private/files/view.php @@ -280,6 +280,11 @@ class View { } public function isDeletable($path) { + $absolutePath = $this->getAbsolutePath($path); + $mount = Filesystem::getMountManager()->find($absolutePath); + if ($mount->getInternalPath($absolutePath) === '') { + return $mount instanceof MoveableMount; + } return $this->basicOperation('isDeletable', $path); } From e656af4c83481b62648335c5eccdf30f8fe56f88 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Wed, 17 Dec 2014 16:09:41 +0100 Subject: [PATCH 2/2] Root always exists --- apps/files_sharing/lib/external/storage.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/apps/files_sharing/lib/external/storage.php b/apps/files_sharing/lib/external/storage.php index 3f1d631a35..306a7b8db8 100644 --- a/apps/files_sharing/lib/external/storage.php +++ b/apps/files_sharing/lib/external/storage.php @@ -167,6 +167,14 @@ class Storage extends DAV implements ISharedStorage { } } + public function file_exists($path) { + if ($path === '') { + return true; + } else { + return parent::file_exists($path); + } + } + /** * check if the configured remote is a valid ownCloud instance *