From: Bjoern Schiessle Date: Mon, 2 Jun 2014 14:38:55 +0000 (+0200) Subject: only lock if unlink is called for a file X-Git-Tag: v7.0.0alpha2~127^2~4 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=48eb0515e9ae96fb5a2ea46307d76454e8b01ae3;p=nextcloud-server.git only lock if unlink is called for a file --- diff --git a/lib/private/files/storage/wrapper/lockingwrapper.php b/lib/private/files/storage/wrapper/lockingwrapper.php index 428c2c516a4..b785046bc3c 100644 --- a/lib/private/files/storage/wrapper/lockingwrapper.php +++ b/lib/private/files/storage/wrapper/lockingwrapper.php @@ -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) {