summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2016-06-15 16:10:25 +0200
committerRobin Appelman <icewind@owncloud.com>2016-06-15 16:10:25 +0200
commit9df60c7956f5efa856fcadb06e879288f08e065b (patch)
treedef45b017618f4074da0b9ec3fceb397380b6984
parent35e2407f1d52a507e1a1cd23a86a1fbee7492a7d (diff)
downloadnextcloud-server-9df60c7956f5efa856fcadb06e879288f08e065b.tar.gz
nextcloud-server-9df60c7956f5efa856fcadb06e879288f08e065b.zip
Fix scanner lock on shared storages resulting into locked files
-rw-r--r--lib/private/files/cache/scanner.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/private/files/cache/scanner.php b/lib/private/files/cache/scanner.php
index db32c0b82eb..12b1b541d24 100644
--- a/lib/private/files/cache/scanner.php
+++ b/lib/private/files/cache/scanner.php
@@ -261,7 +261,7 @@ class Scanner extends BasicEmitter {
$reuse = ($recursive === self::SCAN_SHALLOW) ? self::REUSE_ETAG | self::REUSE_SIZE : self::REUSE_ETAG;
}
if ($lock) {
- $this->storage->acquireLock('scanner::' . $path, ILockingProvider::LOCK_EXCLUSIVE, $this->lockingProvider);
+ $this->lockingProvider->acquireLock('scanner::' . $this->storageId . '::' . $path, ILockingProvider::LOCK_EXCLUSIVE);
$this->storage->acquireLock($path, ILockingProvider::LOCK_SHARED, $this->lockingProvider);
}
$data = $this->scanFile($path, $reuse, -1, null, $lock);
@@ -271,7 +271,7 @@ class Scanner extends BasicEmitter {
}
if ($lock) {
$this->storage->releaseLock($path, ILockingProvider::LOCK_SHARED, $this->lockingProvider);
- $this->storage->releaseLock('scanner::' . $path, ILockingProvider::LOCK_EXCLUSIVE, $this->lockingProvider);
+ $this->lockingProvider->releaseLock('scanner::' . $this->storageId . '::' . $path, ILockingProvider::LOCK_EXCLUSIVE);
}
return $data;
}