summaryrefslogtreecommitdiffstats
path: root/src/common
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2023-06-23 06:46:50 +0200
committerGitHub <noreply@github.com>2023-06-23 06:46:50 +0200
commit3f3e4efb30de021fed52badc34808008276db9e7 (patch)
tree14462b7b13e1ba9f978667f6f2586d6a3fe5df50 /src/common
parentMerge pull request #10794 from 8bitDream/multiples (diff)
parentvfs_real: ensure size cache is reset on write (diff)
downloadyuzu-3f3e4efb30de021fed52badc34808008276db9e7.tar
yuzu-3f3e4efb30de021fed52badc34808008276db9e7.tar.gz
yuzu-3f3e4efb30de021fed52badc34808008276db9e7.tar.bz2
yuzu-3f3e4efb30de021fed52badc34808008276db9e7.tar.lz
yuzu-3f3e4efb30de021fed52badc34808008276db9e7.tar.xz
yuzu-3f3e4efb30de021fed52badc34808008276db9e7.tar.zst
yuzu-3f3e4efb30de021fed52badc34808008276db9e7.zip
Diffstat (limited to 'src/common')
-rw-r--r--src/common/fs/fs.cpp8
-rw-r--r--src/common/fs/fs_types.h2
2 files changed, 5 insertions, 5 deletions
diff --git a/src/common/fs/fs.cpp b/src/common/fs/fs.cpp
index 6d66c926d..1baf6d746 100644
--- a/src/common/fs/fs.cpp
+++ b/src/common/fs/fs.cpp
@@ -436,7 +436,7 @@ void IterateDirEntries(const std::filesystem::path& path, const DirEntryCallable
if (True(filter & DirEntryFilter::File) &&
entry.status().type() == fs::file_type::regular) {
- if (!callback(entry.path())) {
+ if (!callback(entry)) {
callback_error = true;
break;
}
@@ -444,7 +444,7 @@ void IterateDirEntries(const std::filesystem::path& path, const DirEntryCallable
if (True(filter & DirEntryFilter::Directory) &&
entry.status().type() == fs::file_type::directory) {
- if (!callback(entry.path())) {
+ if (!callback(entry)) {
callback_error = true;
break;
}
@@ -493,7 +493,7 @@ void IterateDirEntriesRecursively(const std::filesystem::path& path,
if (True(filter & DirEntryFilter::File) &&
entry.status().type() == fs::file_type::regular) {
- if (!callback(entry.path())) {
+ if (!callback(entry)) {
callback_error = true;
break;
}
@@ -501,7 +501,7 @@ void IterateDirEntriesRecursively(const std::filesystem::path& path,
if (True(filter & DirEntryFilter::Directory) &&
entry.status().type() == fs::file_type::directory) {
- if (!callback(entry.path())) {
+ if (!callback(entry)) {
callback_error = true;
break;
}
diff --git a/src/common/fs/fs_types.h b/src/common/fs/fs_types.h
index 5a4090c19..900f85d24 100644
--- a/src/common/fs/fs_types.h
+++ b/src/common/fs/fs_types.h
@@ -66,6 +66,6 @@ DECLARE_ENUM_FLAG_OPERATORS(DirEntryFilter);
* @returns A boolean value.
* Return true to indicate whether the callback is successful, false otherwise.
*/
-using DirEntryCallable = std::function<bool(const std::filesystem::path& path)>;
+using DirEntryCallable = std::function<bool(const std::filesystem::directory_entry& entry)>;
} // namespace Common::FS