Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Petry <vincent@nextcloud.com>2021-11-09 13:56:10 +0300
committerVincent Petry <vincent@nextcloud.com>2021-11-17 11:24:13 +0300
commit39fe43b914743985693e6243618109aacf8a3882 (patch)
treef999648b55754647ef6af88ef79605926ab9ab81 /lib/private/Files/Cache
parent0a82d2ea3aba7f9f4b25c549f5a83f40dbbb894c (diff)
Normalize file name before existence check in scanner
The scanner would not find a NFD-encoded file name in an existing file list that is normalized. This normalizes the file name before scanning. Fixes issues where scanning repeatedly would make NFD files flicker in and out of existence in the file cache. Signed-off-by: Vincent Petry <vincent@nextcloud.com>
Diffstat (limited to 'lib/private/Files/Cache')
-rw-r--r--lib/private/Files/Cache/Scanner.php1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/private/Files/Cache/Scanner.php b/lib/private/Files/Cache/Scanner.php
index 8baab8746fc..a88d49d32c2 100644
--- a/lib/private/Files/Cache/Scanner.php
+++ b/lib/private/Files/Cache/Scanner.php
@@ -420,6 +420,7 @@ class Scanner extends BasicEmitter implements IScanner {
continue;
}
$file = $fileMeta['name'];
+ $file = trim(\OC\Files\Filesystem::normalizePath($file), '/');
$newChildNames[] = $file;
$child = $path ? $path . '/' . $file : $file;
try {