diff options
author | Squall-Leonhart <danialhorton@hotmail.com> | 2023-09-14 20:47:15 +0200 |
---|---|---|
committer | Squall-Leonhart <danialhorton@hotmail.com> | 2023-09-14 20:47:15 +0200 |
commit | 21ecf01a17c9936d11f86fdb8d7bbf5c5163441c (patch) | |
tree | bfd4b078095f199a677ba8f0a7ffc0047096c19b /src/common/fs/fs.cpp | |
parent | Merge pull request #11496 from liamwhite/ngc (diff) | |
download | yuzu-21ecf01a17c9936d11f86fdb8d7bbf5c5163441c.tar yuzu-21ecf01a17c9936d11f86fdb8d7bbf5c5163441c.tar.gz yuzu-21ecf01a17c9936d11f86fdb8d7bbf5c5163441c.tar.bz2 yuzu-21ecf01a17c9936d11f86fdb8d7bbf5c5163441c.tar.lz yuzu-21ecf01a17c9936d11f86fdb8d7bbf5c5163441c.tar.xz yuzu-21ecf01a17c9936d11f86fdb8d7bbf5c5163441c.tar.zst yuzu-21ecf01a17c9936d11f86fdb8d7bbf5c5163441c.zip |
Diffstat (limited to 'src/common/fs/fs.cpp')
-rw-r--r-- | src/common/fs/fs.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/common/fs/fs.cpp b/src/common/fs/fs.cpp index 36e67c145..174aed49b 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 Operations bool Exists(const fs::path& path) { + std::error_code ec; #ifdef ANDROID if (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 ANDROID if (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 ANDROID if (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 } |