Browse Source

don't call RebuildExternalContentIndex on service initi

fs_external_dlcupdates
Maufeat 3 days ago
parent
commit
750fc3595c
  1. 2
      src/core/core.cpp
  2. 23
      src/core/hle/service/filesystem/filesystem.cpp
  3. 2
      src/qt_common/util/content.cpp

2
src/core/core.cpp

@ -343,6 +343,8 @@ struct System::Impl {
return init_result;
}
fs_controller.RebuildExternalContentIndex();
// Initialize cheat engine
if (cheat_engine) {
cheat_engine->Initialize();

23
src/core/hle/service/filesystem/filesystem.cpp

@ -725,7 +725,6 @@ void FileSystemController::CreateFactories(FileSys::VfsFilesystem& vfs, bool ove
external_provider.get());
}
RebuildExternalContentIndex();
}
void FileSystemController::RebuildExternalContentIndex() {
@ -735,16 +734,20 @@ void FileSystemController::RebuildExternalContentIndex() {
}
if (!Settings::values.external_dirs.empty()) {
FileSys::ExternalContentPaths paths{};
for (const auto& dir : Settings::values.external_dirs) {
if (dir.empty())
continue;
paths.update_dirs.push_back(dir);
paths.dlc_dirs.push_back(dir);
try {
FileSys::ExternalContentPaths paths{};
for (const auto& dir : Settings::values.external_dirs) {
if (dir.empty())
continue;
paths.update_dirs.push_back(dir);
paths.dlc_dirs.push_back(dir);
}
FileSys::ExternalContentIndexer indexer{system.GetFilesystem(),
*this->external_provider, std::move(paths)};
indexer.Rebuild();
} catch (const std::exception& e) {
LOG_ERROR(Service_FS, "Failed to rebuild external content index: {}", e.what());
}
FileSys::ExternalContentIndexer indexer{system.GetFilesystem(), *this->external_provider,
std::move(paths)};
indexer.Rebuild();
} else {
external_provider->ClearAllEntries();
}

2
src/qt_common/util/content.cpp

@ -160,6 +160,7 @@ void InstallFirmware(const QString& location, bool recursive)
// Re-scan VFS for the newly placed firmware files.
system->GetFileSystemController().CreateFactories(*vfs);
system->GetFileSystemController().RebuildExternalContentIndex();
auto VerifyFirmwareCallback = [&](size_t total_size, size_t processed_size) {
progress.setValue(90 + static_cast<int>((processed_size * 10) / total_size));
@ -275,6 +276,7 @@ void InstallKeys()
= FirmwareManager::InstallKeys(key_source_location.toStdString(), "keys");
system->GetFileSystemController().CreateFactories(*QtCommon::vfs);
system->GetFileSystemController().RebuildExternalContentIndex();
const QString resMsg = GetKeyInstallResultString(result);
switch (result) {

Loading…
Cancel
Save