QT: Use SetStatusText instead of passing a formatted string as a fmt

This caused crashes when file names had percent signs in them because we passed the file name as the format to SetFormattedStatusText. I opted to continue to use fmt for consistency.
This commit is contained in:
Ty Lamontagne 2024-11-20 13:10:52 -05:00 committed by Ty
parent f113a51783
commit e3fedf1676
1 changed files with 1 additions and 1 deletions

View File

@ -623,7 +623,7 @@ void GameList::ScanDirectory(const char* path, bool recursive, bool only_cache,
}
const std::string_view filename = Path::GetFileName(ffd.FileName);
progress->SetFormattedStatusText(fmt::format(TRANSLATE_FS("GameList","Scanning {}..."), filename.data()).c_str());
progress->SetStatusText(fmt::format(TRANSLATE_FS("GameList","Scanning {}..."), filename.data()).c_str());
ScanFile(std::move(ffd.FileName), ffd.ModificationTime, lock, played_time_map, custom_attributes_ini);
progress->SetProgressValue(files_scanned);
}