From 7ca76ae5a8a560fbe27f4d64cfbd4bfa6c8be9fd Mon Sep 17 00:00:00 2001 From: Nekotekina Date: Tue, 15 Oct 2019 18:57:16 +0300 Subject: [PATCH] Workaround fs::create_path for drive roots Should fix the regression from #6763 --- Utilities/File.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Utilities/File.cpp b/Utilities/File.cpp index cfbc615dbf..d8626ea25b 100644 --- a/Utilities/File.cpp +++ b/Utilities/File.cpp @@ -553,7 +553,12 @@ bool fs::create_path(const std::string& path) { const std::string parent = get_parent_dir(path); +#ifdef _WIN32 + // Workaround: don't call is_dir with naked drive letter + if (!parent.empty() && parent.back() != ':' && !is_dir(parent) && !create_path(parent)) +#else if (!parent.empty() && !is_dir(parent) && !create_path(parent)) +#endif { return false; }