diff options
author | Bjoern Schiessle <schiessle@owncloud.com> | 2014-06-02 16:38:55 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2014-06-04 07:55:46 +0200 |
commit | 48eb0515e9ae96fb5a2ea46307d76454e8b01ae3 (patch) | |
tree | 038113f0c36e2f18ac773bdb467a7303bff3cfc4 /lib/private/files/storage/wrapper | |
parent | 2b30fb4862ac8c97dad4bde55a3ff8e406c74e47 (diff) | |
download | nextcloud-server-48eb0515e9ae96fb5a2ea46307d76454e8b01ae3.tar.gz nextcloud-server-48eb0515e9ae96fb5a2ea46307d76454e8b01ae3.zip |
only lock if unlink is called for a file
Diffstat (limited to 'lib/private/files/storage/wrapper')
-rw-r--r-- | lib/private/files/storage/wrapper/lockingwrapper.php | 4 |
1 files changed, 3 insertions, 1 deletions
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) { |