From 8859004a2bb1a65d71553b55562c79d9a20cfb3e Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Wed, 24 Jun 2015 15:42:00 +0200 Subject: [PATCH] Rollback folder scan if an entry was locked --- lib/private/files/cache/scanner.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/private/files/cache/scanner.php b/lib/private/files/cache/scanner.php index 12aa05277a..50609e1e20 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);