COMMON: Decode filenames from Punycode upon returning

This commit is contained in:
Eugene Sandulenko 2021-07-27 14:23:55 +02:00
parent 0b1c95aadf
commit f3145d0fb6
No known key found for this signature in database
GPG Key ID: 014D387312D34F08

View File

@ -94,7 +94,8 @@ String FSNode::getDisplayName() const {
String FSNode::getName() const {
assert(_realNode);
return _realNode->getName();
// We transparently decode any punycode-named files
return punycode_decodefilename(_realNode->getName());
}
FSNode FSNode::getParent() const {
@ -291,9 +292,6 @@ void FSDirectory::cacheDirectoryRecursive(FSNode node, int depth, const String&
String lowercaseName = name;
lowercaseName.toLowercase();
// We transparently decode any punycode-named files
lowercaseName = punycode_decodefilename(lowercaseName);
// since the hashmap is case insensitive, we need to check for clashes when caching
if (it->isDirectory()) {
if (!_flat && _subDirCache.contains(lowercaseName)) {