diff options
author | MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> | 2023-07-14 11:28:42 +0200 |
---|---|---|
committer | MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> | 2023-09-14 18:58:37 +0200 |
commit | fada2f91108a56cc5c447bd6b6fac411e4d5cdca (patch) | |
tree | 57b132108219efc501adcb920d19a431769be07b /src/util | |
parent | f5c5ddafbcaad7225312cb032b108a3527f0ac0f (diff) |
refactor: Replace <filesystem> with <util/fs.h>
All code in this repo uses <util/fs.h>, except for a few lines. This is
confusing and potentially dangerous, if the safe <util/fs.h> wrappers
are not used.
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/fs.h | 1 | ||||
-rw-r--r-- | src/util/fs_helpers.cpp | 4 |
2 files changed, 2 insertions, 3 deletions
diff --git a/src/util/fs.h b/src/util/fs.h index 8f79f6cba6..7e2803b6aa 100644 --- a/src/util/fs.h +++ b/src/util/fs.h @@ -184,6 +184,7 @@ static inline path PathFromString(const std::string& string) * already exists or is a symlink to an existing directory. * This is a temporary workaround for an issue in libstdc++ that has been fixed * upstream [PR101510]. + * https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101510 */ static inline bool create_directories(const std::filesystem::path& p) { diff --git a/src/util/fs_helpers.cpp b/src/util/fs_helpers.cpp index 2a9eb3502e..8aa7493aa8 100644 --- a/src/util/fs_helpers.cpp +++ b/src/util/fs_helpers.cpp @@ -11,13 +11,11 @@ #include <logging.h> #include <sync.h> -#include <tinyformat.h> #include <util/fs.h> #include <util/getuniquepath.h> #include <util/syserror.h> #include <cerrno> -#include <filesystem> #include <fstream> #include <map> #include <memory> @@ -263,7 +261,7 @@ bool RenameOver(fs::path src, fs::path dest) { #ifdef __MINGW64__ // This is a workaround for a bug in libstdc++ which - // implements std::filesystem::rename with _wrename function. + // implements fs::rename with _wrename function. // This bug has been fixed in upstream: // - GCC 10.3: 8dd1c1085587c9f8a21bb5e588dfe1e8cdbba79e // - GCC 11.1: 1dfd95f0a0ca1d9e6cbc00e6cbfd1fa20a98f312 |