|
|
@ -478,7 +478,7 @@ SPDLOG_INLINE bool mkdir_(const filename_t &path)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// create the given directory - and all directories leading to it
|
|
|
|
// create the given directory - and all directories leading to it
|
|
|
|
// return true on success
|
|
|
|
// return true on success or if the directory already exists
|
|
|
|
SPDLOG_INLINE bool create_dir(filename_t path)
|
|
|
|
SPDLOG_INLINE bool create_dir(filename_t path)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (path_exists(path))
|
|
|
|
if (path_exists(path))
|
|
|
@ -486,6 +486,11 @@ SPDLOG_INLINE bool create_dir(filename_t path)
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(path.empty())
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef _WIN32
|
|
|
|
#ifdef _WIN32
|
|
|
|
// support forward slash in windows
|
|
|
|
// support forward slash in windows
|
|
|
|
std::replace(path.begin(), path.end(), '/', folder_sep);
|
|
|
|
std::replace(path.begin(), path.end(), '/', folder_sep);
|
|
|
|