mirror of
https://github.com/yuzu-emu/yuzu-mainline.git
synced 2024-12-26 02:05:34 +00:00
common/file_util: Succeed on CreateDir when the directory exists
This commit is contained in:
parent
e94dd7e2c4
commit
52f13f2339
|
@ -98,6 +98,11 @@ bool Delete(const fs::path& path) {
|
||||||
bool CreateDir(const fs::path& path) {
|
bool CreateDir(const fs::path& path) {
|
||||||
LOG_TRACE(Common_Filesystem, "directory {}", path.string());
|
LOG_TRACE(Common_Filesystem, "directory {}", path.string());
|
||||||
|
|
||||||
|
if (Exists(path)) {
|
||||||
|
LOG_DEBUG(Common_Filesystem, "path exists {}", path.string());
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
std::error_code ec;
|
std::error_code ec;
|
||||||
const bool success = fs::create_directory(path, ec);
|
const bool success = fs::create_directory(path, ec);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue