Display folder names demangled in the settings
authorKevin Ottens <kevin.ottens@nextcloud.com>
Tue, 23 Jun 2020 17:24:56 +0000 (19:24 +0200)
committerKevin Ottens <kevin.ottens@nextcloud.com>
Tue, 30 Jun 2020 09:29:08 +0000 (11:29 +0200)
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
src/gui/folderstatusmodel.cpp

index c337d8351a2cb1b20f7acdb8a3b80c3ad312ad3a..88cf04db960a22843888210e3f5726bcfc11098b 100644 (file)
@@ -690,7 +690,14 @@ void FolderStatusModel::slotUpdateDirectories(const QStringList &list)
         newInfo._pathIdx << newSubs.size();
         newInfo._isExternal = permissionMap.value(removeTrailingSlash(path)).toString().contains("M");
         newInfo._path = relativePath;
-        newInfo._name = removeTrailingSlash(relativePath).split('/').last();
+
+        SyncJournalFileRecord rec;
+        parentInfo->_folder->journalDb()->getFileRecordByE2eMangledName(removeTrailingSlash(relativePath), &rec);
+        if (rec.isValid()) {
+            newInfo._name = removeTrailingSlash(rec._path).split('/').last();
+        } else {
+            newInfo._name = removeTrailingSlash(relativePath).split('/').last();
+        }
 
         const auto& folderInfo = job->_folderInfos.value(path);
         newInfo._size = folderInfo.size;