aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/files/storage
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2016-01-04 14:11:21 +0100
committerRobin Appelman <icewind@owncloud.com>2016-01-14 13:01:43 +0100
commitbdf51d9ea4a3fb3e6b0e3d019ed06ca0d9cb3d3a (patch)
treed2d348f89c1de9a26124e861912777ad3bd1f2bc /lib/private/files/storage
parent0724ac1e5ed83926ed9cbbb8c660b40ef1254da8 (diff)
downloadnextcloud-server-bdf51d9ea4a3fb3e6b0e3d019ed06ca0d9cb3d3a.tar.gz
nextcloud-server-bdf51d9ea4a3fb3e6b0e3d019ed06ca0d9cb3d3a.zip
only trigger locking on lockingstorages
Diffstat (limited to 'lib/private/files/storage')
-rw-r--r--lib/private/files/storage/wrapper/wrapper.php15
1 files changed, 11 insertions, 4 deletions
diff --git a/lib/private/files/storage/wrapper/wrapper.php b/lib/private/files/storage/wrapper/wrapper.php
index 472c60b5faa..c632aa399e1 100644
--- a/lib/private/files/storage/wrapper/wrapper.php
+++ b/lib/private/files/storage/wrapper/wrapper.php
@@ -26,9 +26,10 @@
namespace OC\Files\Storage\Wrapper;
use OCP\Files\InvalidPathException;
+use OCP\Files\Storage\ILockingStorage;
use OCP\Lock\ILockingProvider;
-class Wrapper implements \OC\Files\Storage\Storage {
+class Wrapper implements \OC\Files\Storage\Storage, ILockingStorage {
/**
* @var \OC\Files\Storage\Storage $storage
*/
@@ -583,7 +584,9 @@ class Wrapper implements \OC\Files\Storage\Storage {
* @throws \OCP\Lock\LockedException
*/
public function acquireLock($path, $type, ILockingProvider $provider) {
- $this->storage->acquireLock($path, $type, $provider);
+ if ($this->storage->instanceOfStorage('\OCP\Files\Storage\ILockingStorage')) {
+ $this->storage->acquireLock($path, $type, $provider);
+ }
}
/**
@@ -592,7 +595,9 @@ class Wrapper implements \OC\Files\Storage\Storage {
* @param \OCP\Lock\ILockingProvider $provider
*/
public function releaseLock($path, $type, ILockingProvider $provider) {
- $this->storage->releaseLock($path, $type, $provider);
+ if ($this->storage->instanceOfStorage('\OCP\Files\Storage\ILockingStorage')) {
+ $this->storage->releaseLock($path, $type, $provider);
+ }
}
/**
@@ -601,6 +606,8 @@ class Wrapper implements \OC\Files\Storage\Storage {
* @param \OCP\Lock\ILockingProvider $provider
*/
public function changeLock($path, $type, ILockingProvider $provider) {
- $this->storage->changeLock($path, $type, $provider);
+ if ($this->storage->instanceOfStorage('\OCP\Files\Storage\ILockingStorage')) {
+ $this->storage->changeLock($path, $type, $provider);
+ }
}
}