aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Files/Utils
diff options
context:
space:
mode:
authorVincent Petry <vincent@nextcloud.com>2021-11-10 15:09:25 +0100
committerVincent Petry <vincent@nextcloud.com>2021-11-17 09:24:13 +0100
commit67ebe75d0ee02977b95e43a31516d936d18514a2 (patch)
treefaabc953b23e23c9415c11d0d578536268bea04f /lib/private/Files/Utils
parent39fe43b914743985693e6243618109aacf8a3882 (diff)
downloadnextcloud-server-67ebe75d0ee02977b95e43a31516d936d18514a2.tar.gz
nextcloud-server-67ebe75d0ee02977b95e43a31516d936d18514a2.zip
Move storage encoding compatibility warning logic
The encoding check for file names is now happening the Scanner, and an event will be emitted only if the storage doesn't contain the encoding compatibility wrapper. The event is listened to by the occ scan command to be able to display a warning in case of file name mismatches when they have NFD encoding. Signed-off-by: Vincent Petry <vincent@nextcloud.com>
Diffstat (limited to 'lib/private/Files/Utils')
-rw-r--r--lib/private/Files/Utils/Scanner.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/private/Files/Utils/Scanner.php b/lib/private/Files/Utils/Scanner.php
index 72a7084f40d..faeb31db8cc 100644
--- a/lib/private/Files/Utils/Scanner.php
+++ b/lib/private/Files/Utils/Scanner.php
@@ -145,6 +145,9 @@ class Scanner extends PublicEmitter {
$this->emit('\OC\Files\Utils\Scanner', 'postScanFolder', [$mount->getMountPoint() . $path]);
$this->dispatcher->dispatchTyped(new FolderScannedEvent($mount->getMountPoint() . $path));
});
+ $scanner->listen('\OC\Files\Cache\Scanner', 'normalizedNameMismatch', function ($path) use ($mount) {
+ $this->emit('\OC\Files\Utils\Scanner', 'normalizedNameMismatch', [$path]);
+ });
}
/**