summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorliamwhite <liamwhite@users.noreply.github.com>2023-09-16 17:40:10 +0200
committerGitHub <noreply@github.com>2023-09-16 17:40:10 +0200
commit13d551846accd4e3f2a4f5ab9a5c5ab461f8ed1b (patch)
tree083b8b14d59b71183aa3bb1942cf5c6ad0e36a7b
parentMerge pull request #11492 from lat9nq/c-numeric-conversions (diff)
parentadd std::error_code for std::filesystem exceptions (diff)
downloadyuzu-13d551846accd4e3f2a4f5ab9a5c5ab461f8ed1b.tar
yuzu-13d551846accd4e3f2a4f5ab9a5c5ab461f8ed1b.tar.gz
yuzu-13d551846accd4e3f2a4f5ab9a5c5ab461f8ed1b.tar.bz2
yuzu-13d551846accd4e3f2a4f5ab9a5c5ab461f8ed1b.tar.lz
yuzu-13d551846accd4e3f2a4f5ab9a5c5ab461f8ed1b.tar.xz
yuzu-13d551846accd4e3f2a4f5ab9a5c5ab461f8ed1b.tar.zst
yuzu-13d551846accd4e3f2a4f5ab9a5c5ab461f8ed1b.zip
Diffstat (limited to '')
-rw-r--r--src/common/fs/fs.cpp15
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
}