From fa9dacdbde7dc18d134019bdad24f47e4dea1dda Mon Sep 17 00:00:00 2001 From: MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> Date: Mon, 10 Nov 2025 16:43:11 +0100 Subject: [PATCH] util: [refactor] Remove unused create_directories workaround This was added in commit 1f46b6e46e1454b91ff7ceb31853bc440952f8eb, but is no longer needed after g++-12 is the minimum required. --- src/util/fs.h | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/src/util/fs.h b/src/util/fs.h index 8b5c0460257..147904d030a 100644 --- a/src/util/fs.h +++ b/src/util/fs.h @@ -185,29 +185,6 @@ static inline path PathFromString(const std::string& string) return std::filesystem::path(string); #endif } - -/** - * Create directory (and if necessary its parents), unless the leaf directory - * 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) -{ - if (std::filesystem::is_symlink(p) && std::filesystem::is_directory(p)) { - return false; - } - return std::filesystem::create_directories(p); -} - -/** - * This variant is not used. Delete it to prevent it from accidentally working - * around the workaround. If it is needed, add a workaround in the same pattern - * as above. - */ -bool create_directories(const std::filesystem::path& p, std::error_code& ec) = delete; - } // namespace fs /** Bridge operations to C stdio */