summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2015-06-24 15:42:00 +0200
committerVincent Petry <pvince81@owncloud.com>2015-06-24 15:42:00 +0200
commit8859004a2bb1a65d71553b55562c79d9a20cfb3e (patch)
treefab7095b7bcf48727a30ad2a5934d851663b395a /lib
parent35047a23000fa4788a06332428aa0f844394816f (diff)
downloadnextcloud-server-8859004a2bb1a65d71553b55562c79d9a20cfb3e.tar.gz
nextcloud-server-8859004a2bb1a65d71553b55562c79d9a20cfb3e.zip
Rollback folder scan if an entry was locked
Diffstat (limited to 'lib')
-rw-r--r--lib/private/files/cache/scanner.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/private/files/cache/scanner.php b/lib/private/files/cache/scanner.php
index 12aa05277a1..50609e1e20e 100644
--- a/lib/private/files/cache/scanner.php
+++ b/lib/private/files/cache/scanner.php
@@ -357,6 +357,11 @@ class Scanner extends BasicEmitter {
// log and ignore
\OC_Log::write('core', 'Exception while scanning file "' . $child . '": ' . $ex->getMessage(), \OC_Log::DEBUG);
$exceptionOccurred = true;
+ } catch (\OCP\Lock\LockedException $e) {
+ if ($this->useTransactions) {
+ \OC_DB::rollback();
+ }
+ throw $e;
}
}
$removedChildren = \array_diff(array_keys($existingChildren), $newChildren);