]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fix removing remote shares
authorRobin Appelman <icewind@owncloud.com>
Thu, 15 May 2014 10:13:46 +0000 (12:13 +0200)
committerBjoern Schiessle <schiessle@owncloud.com>
Sat, 14 Jun 2014 08:13:24 +0000 (10:13 +0200)
apps/files_sharing/lib/external/storage.php

index 2683a6a6902c841fdf95ecddc44146351b3b8b02..0e799a0e9e305f8b1e4b933d730cdc4fb895ce3f 100644 (file)
@@ -88,4 +88,22 @@ class Storage extends \OC\Files\Storage\DAV implements ISharedStorage {
                        return false;
                }
        }
+
+       public function unlink($path) {
+               if ($path === '' || $path === false) {
+                       $this->manager->removeShare($this->mountPoint);
+                       return true;
+               } else {
+                       return parent::unlink($path);
+               }
+       }
+
+       public function rmdir($path) {
+               if ($path === '' || $path === false) {
+                       $this->manager->removeShare($this->mountPoint);
+                       return true;
+               } else {
+                       return parent::rmdir($path);
+               }
+       }
 }