PathBrowser: Abandon a network listing when navigating away

PathBrowser lists on one thread, so going up from the network folder
waited for its listing to finish (up to 8 seconds) before the drive list
showed. Pass GetFilesInDir a cancel flag that PathBrowser sets whenever
the path changes, or on destruction, and check it while waiting.

Also don't probe the drives in the drive list for game folders.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Henrik RydgårdandClaude Opus 5.5 committed 2026-10-24 02:44:17 +02:00
1 parent c14fc1d1d0
commit adfbd7a259
5 files changed
+29 -10

No files matched your search

+2 -2
View File
@@ -1133,8 +1133,8 @@ void GameBrowser::Refresh() {
path_.GetListing(fileInfo, "iso:cso:chd:pbp:elf:prx:ppdmp:cue:ccd:mds:bin:img:");
// PS1 discs: a .bin or .img shows up as its cue sheet or .ccd, when it has one.
RemoveDescribedDiscImages(&fileInfo);
// Servers aren't games, and probing one that's gone away can take seconds.
const bool probeDirs = !path_.GetPath().IsNetworkRoot();
// Drives and servers aren't games, and probing a server that's gone away can take seconds.
const bool probeDirs = !path_.GetPath().IsRoot() && !path_.GetPath().IsNetworkRoot();
for (size_t i = 0; i < fileInfo.size(); i++) {
bool isGame = !fileInfo[i].isDirectory;
bool isSaveData = false;