diff --git a/kDriveCore/Data/Models/File.swift b/kDriveCore/Data/Models/File.swift index 14aa3617f..9fa389ff1 100644 --- a/kDriveCore/Data/Models/File.swift +++ b/kDriveCore/Data/Models/File.swift @@ -756,7 +756,10 @@ public final class File: Object, Codable { uid = File.uid(driveId: driveId, fileId: id) let decodedName = try container.decode(String.self, forKey: .name) name = decodedName - sortedName = try container.decodeIfPresent(String.self, forKey: .sortedName) ?? decodedName + sortedName = try (container.decodeIfPresent(String.self, forKey: .sortedName) ?? decodedName).lowercased().folding( + options: .diacriticInsensitive, + locale: .current + ) path = try container.decodeIfPresent(String.self, forKey: .path) rawType = try container.decode(String.self, forKey: .rawType) rawStatus = try container.decodeIfPresent(String.self, forKey: .rawStatus)