From 2e7944482841355ebd3b600e4f160da2ce4e60cf Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Tue, 9 Nov 2021 11:56:10 +0100 Subject: [PATCH] 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 --- lib/private/Files/Cache/Scanner.php | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/private/Files/Cache/Scanner.php b/lib/private/Files/Cache/Scanner.php index 7bb0341e201..6dc22a79b14 100644 --- a/lib/private/Files/Cache/Scanner.php +++ b/lib/private/Files/Cache/Scanner.php @@ -421,6 +421,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 {