Rollback folder scan if an entry was locked
This commit is contained in:
parent
35047a2300
commit
8859004a2b
|
@ -357,6 +357,11 @@ class Scanner extends BasicEmitter {
|
||||||
// log and ignore
|
// log and ignore
|
||||||
\OC_Log::write('core', 'Exception while scanning file "' . $child . '": ' . $ex->getMessage(), \OC_Log::DEBUG);
|
\OC_Log::write('core', 'Exception while scanning file "' . $child . '": ' . $ex->getMessage(), \OC_Log::DEBUG);
|
||||||
$exceptionOccurred = true;
|
$exceptionOccurred = true;
|
||||||
|
} catch (\OCP\Lock\LockedException $e) {
|
||||||
|
if ($this->useTransactions) {
|
||||||
|
\OC_DB::rollback();
|
||||||
|
}
|
||||||
|
throw $e;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$removedChildren = \array_diff(array_keys($existingChildren), $newChildren);
|
$removedChildren = \array_diff(array_keys($existingChildren), $newChildren);
|
||||||
|
|
Loading…
Reference in New Issue