summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2016-06-16 14:03:21 +0200
committerGitHub <noreply@github.com>2016-06-16 14:03:21 +0200
commit680ee050475d499ccc0cce1f4241ce4e406c1f00 (patch)
treedef45b017618f4074da0b9ec3fceb397380b6984
parent35e2407f1d52a507e1a1cd23a86a1fbee7492a7d (diff)
parent9df60c7956f5efa856fcadb06e879288f08e065b (diff)
downloadnextcloud-server-680ee050475d499ccc0cce1f4241ce4e406c1f00.tar.gz
nextcloud-server-680ee050475d499ccc0cce1f4241ce4e406c1f00.zip
Merge pull request #25122 from owncloud/scanner-locking-shared-82
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;
}