We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 83fa20b commit 71c4f88Copy full SHA for 71c4f88
third_party/spdlog_headers/spdlog/details/os-inl.h
@@ -534,6 +534,15 @@ SPDLOG_INLINE bool create_dir(const filename_t &path) {
534
}
535
536
auto subdir = path.substr(0, token_pos);
537
+#ifdef _WIN32
538
+ // if subdir is just a drive letter, add a slash e.g. "c:"=>"c:\",
539
+ // otherwise path_exists(subdir) returns false (issue #3079)
540
+ const bool is_drive = subdir.length() == 2 && subdir[1] == ':';
541
+ if (is_drive) {
542
+ subdir += '\\';
543
+ token_pos++;
544
+ }
545
+#endif
546
547
if (!subdir.empty() && !path_exists(subdir) && !mkdir_(subdir)) {
548
return false; // return error if failed creating dir
0 commit comments