diff options
author | Robin Appelman <robin@icewind.nl> | 2025-04-25 18:35:12 +0200 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2025-04-25 18:40:03 +0200 |
commit | bb4cf2830aca984c001542b3cdc2ebc78bba6941 (patch) | |
tree | ae68a2574ea38a2b833be627df600c1f14096681 /lib/private/Files/Cache/Scanner.php | |
parent | 5f40fad790a16f9613e796728c23f47e80bcb6ee (diff) | |
download | nextcloud-server-scan-locked-error.tar.gz nextcloud-server-scan-locked-error.zip |
fix: better error message when trying to scan a folder that is already being scannedscan-locked-error
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'lib/private/Files/Cache/Scanner.php')
-rw-r--r-- | lib/private/Files/Cache/Scanner.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/private/Files/Cache/Scanner.php b/lib/private/Files/Cache/Scanner.php index 1fb408a0655..b067f70b8cb 100644 --- a/lib/private/Files/Cache/Scanner.php +++ b/lib/private/Files/Cache/Scanner.php @@ -210,7 +210,7 @@ class Scanner extends BasicEmitter implements IScanner { * @var \OC\Files\Cache\CacheEntry $cacheData */ $newData = $this->array_diff_assoc_multi($data, $cacheData->getData()); - + // make it known to the caller that etag has been changed and needs propagation if (isset($newData['etag'])) { $data['etag_changed'] = true; @@ -351,23 +351,23 @@ class Scanner extends BasicEmitter implements IScanner { * */ protected function array_diff_assoc_multi(array $array1, array $array2) { - + $result = []; foreach ($array1 as $key => $value) { - + // if $array2 doesn't have the same key, that's a result if (!array_key_exists($key, $array2)) { $result[$key] = $value; continue; } - + // if $array2's value for the same key is different, that's a result if ($array2[$key] !== $value && !is_array($value)) { $result[$key] = $value; continue; } - + if (is_array($value)) { $nestedDiff = $this->array_diff_assoc_multi($value, $array2[$key]); if (!empty($nestedDiff)) { |