Skip to content

Commit

Permalink
Scanner must normalize new children names for cache diff
Browse files Browse the repository at this point in the history
Since new children from the storage might contain NFD entries, these
must be normalized to NFC to be properly diff'ed with the cache
contents which is always NFC.

This fixes an issue where NFD entries would disappear from the cache
after rescannng for children.
  • Loading branch information
Vincent Petry committed May 19, 2016
1 parent 65e99f1 commit e6f31f2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/private/Files/Cache/Scanner.php
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ protected function getNewChildren($folder) {
if (is_resource($dh)) {
while (($file = readdir($dh)) !== false) {
if (!Filesystem::isIgnoredDir($file)) {
$children[] = $file;
$children[] = trim(\OC\Files\Filesystem::normalizePath($file), '/');
}
}
}
Expand Down

0 comments on commit e6f31f2

Please sign in to comment.