diff options
author | dec05eba <dec05eba@protonmail.com> | 2021-09-13 21:30:39 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2021-09-13 21:30:39 +0200 |
commit | b97c4c3ccad3c917e2073329e8d1c7b7351e96aa (patch) | |
tree | 0e5b5791ace6f1f72dac4ce42ca5d990165fc3c7 /src/Storage.cpp | |
parent | a9d69f57a0cd4f9cccff07b2890a860695d1e7ed (diff) |
Include refactoring
Diffstat (limited to 'src/Storage.cpp')
-rw-r--r-- | src/Storage.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Storage.cpp b/src/Storage.cpp index 3ceb606..2754bc8 100644 --- a/src/Storage.cpp +++ b/src/Storage.cpp @@ -9,6 +9,7 @@ #include <rapidjson/writer.h> #include <rapidjson/stringbuffer.h> #include <unordered_set> +#include <filesystem> #include <pwd.h> #include <unistd.h> @@ -238,7 +239,7 @@ namespace QuickMedia { void for_files_in_dir(const Path &path, FileIteratorCallback callback) { try { for(auto &p : std::filesystem::directory_iterator(path.data)) { - if(!callback(p.path())) + if(!callback(p.path().string())) break; } } catch(const std::filesystem::filesystem_error &err) { @@ -271,7 +272,7 @@ namespace QuickMedia { }); for(auto &p : paths) { - if(!callback(p.path())) + if(!callback(p.path().string())) break; } } |