diff options
author | Vincent Petry <vincent@nextcloud.com> | 2021-11-09 11:56:10 +0100 |
---|---|---|
committer | Vincent Petry <vincent@nextcloud.com> | 2021-11-17 09:24:13 +0100 |
commit | 39fe43b914743985693e6243618109aacf8a3882 (patch) | |
tree | f999648b55754647ef6af88ef79605926ab9ab81 /lib | |
parent | 0a82d2ea3aba7f9f4b25c549f5a83f40dbbb894c (diff) | |
download | nextcloud-server-39fe43b914743985693e6243618109aacf8a3882.tar.gz nextcloud-server-39fe43b914743985693e6243618109aacf8a3882.zip |
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')
-rw-r--r-- | lib/private/Files/Cache/Scanner.php | 1 |
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 { |