Rollback folder scan if an entry was locked
This commit is contained in:
parent
35047a2300
commit
8859004a2b
1 changed files with 5 additions and 0 deletions
5
lib/private/files/cache/scanner.php
vendored
5
lib/private/files/cache/scanner.php
vendored
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue