Procházet zdrojové kódy

core:filesystem: speed up IDirectory service

vonchenplus před 3 roky
rodič
revize
bd018e0123
1 změnil soubory, kde provedl 2 přidání a 1 odebrání
  1. 2 1
      src/core/hle/service/filesystem/fsp_srv.cpp

+ 2 - 1
src/core/hle/service/filesystem/fsp_srv.cpp

@@ -246,7 +246,8 @@ static void BuildEntryIndex(std::vector<FileSys::Entry>& entries, const std::vec
     entries.reserve(entries.size() + new_data.size());
 
     for (const auto& new_entry : new_data) {
-        entries.emplace_back(new_entry->GetName(), type, new_entry->GetSize());
+        entries.emplace_back(new_entry->GetName(), type,
+                             type == FileSys::EntryType::Directory ? 0 : new_entry->GetSize());
     }
 }