]> source.dussan.org Git - nextcloud-server.git/commitdiff
only lock if unlink is called for a file
authorBjoern Schiessle <schiessle@owncloud.com>
Mon, 2 Jun 2014 14:38:55 +0000 (16:38 +0200)
committerThomas Müller <thomas.mueller@tmit.eu>
Wed, 4 Jun 2014 05:55:46 +0000 (07:55 +0200)
lib/private/files/storage/wrapper/lockingwrapper.php

index 428c2c516a42a07c404914c78d537c264dc3b952..b785046bc3cf959a9ba3b2b9decd7e95741c620d 100644 (file)
@@ -164,7 +164,9 @@ class LockingWrapper extends Wrapper {
 
        public function unlink($path) {
                try {
-                       $this->getLock($path, Lock::WRITE);
+                       if (\OC\Files\Filesystem::is_file($path)) {
+                               $this->getLock($path, Lock::WRITE);
+                       }
                        $result = $this->storage->unlink($path);
                }
                catch(\Exception $originalException) {