VERY experimental Nintendo Switch 2 emulator
C++
add std::error_code for std::filesystem exceptions
Squall-Leonharte263eb1a987c
diff --git a/src/common/fs/fs.cpp b/src/common/fs/fs.cppindex 36e67c145c..174aed49b8 100644--- a/src/common/fs/fs.cpp+++ b/src/common/fs/fs.cpp@@ -528,38 +528,41 @@ void IterateDirEntriesRecursively(const std::filesystem::path& path,// Generic Filesystem Operationsbool Exists(const fs::path& path) {+ std::error_code ec;#ifdef ANDROIDif (Android::IsContentUri(path)) {return Android::Exists(path);} else {- return fs::exists(path);+ return fs::exists(path, ec);}#else- return fs::exists(path);+ return fs::exists(path, ec);#endif}bool IsFile(const fs::path& path) {+ std::error_code ec;#ifdef ANDROIDif (Android::IsContentUri(path)) {return !Android::IsDirectory(path);} else {- return fs::is_regular_file(path);+ return fs::is_regular_file(path, ec);}#else- return fs::is_regular_file(path);+ return fs::is_regular_file(path, ec);#endif}bool IsDir(const fs::path& path) {+ std::error_code ec;#ifdef ANDROIDif (Android::IsContentUri(path)) {return Android::IsDirectory(path);} else {- return fs::is_directory(path);+ return fs::is_directory(path, ec);}#else- return fs::is_directory(path);+ return fs::is_directory(path, ec);#endif}