diff --git a/Common/File/PathBrowser.cpp b/Common/File/PathBrowser.cpp index 26cfd64ef5..f7f426544a 100644 --- a/Common/File/PathBrowser.cpp +++ b/Common/File/PathBrowser.cpp @@ -128,13 +128,6 @@ void PathBrowser::HandlePath() { return; } - if (path_.Type() != PathType::HTTP) { - if (pendingActive_) - ResetPending(); - ready_ = true; - return; - } - std::lock_guard guard(pendingLock_); ready_ = false; pendingActive_ = true; @@ -163,6 +156,12 @@ void PathBrowser::HandlePath() { results.clear(); success = LoadRemoteFileList(lastPath, &pendingCancel_, results); guard.lock(); + } else { + guard.unlock(); + results.clear(); + File::GetFilesInDir(lastPath, &results, nullptr); + success = true; + guard.lock(); } if (pendingPath_ == lastPath) { @@ -214,12 +213,7 @@ bool PathBrowser::GetListing(std::vector &fileInfo, const char * guard.lock(); } - if (path_.Type() == PathType::HTTP) { - fileInfo = ApplyFilter(pendingFiles_, filter); - return true; - } - - File::GetFilesInDir(path_, &fileInfo, filter); + fileInfo = ApplyFilter(pendingFiles_, filter); return true; }