diff options
| author | 2020-12-09 05:21:08 -0300 | |
|---|---|---|
| committer | 2020-12-09 05:21:08 -0300 | |
| commit | 52f13f2339f8c7259d2aa646346b29997b85c0ec (patch) | |
| tree | c587411f18b2813367973f14fbd2346217a9c01b /src/common/file_util.cpp | |
| parent | Merge pull request #5142 from comex/xx-poll-events (diff) | |
| download | yuzu-52f13f2339f8c7259d2aa646346b29997b85c0ec.tar.gz yuzu-52f13f2339f8c7259d2aa646346b29997b85c0ec.tar.xz yuzu-52f13f2339f8c7259d2aa646346b29997b85c0ec.zip | |
common/file_util: Succeed on CreateDir when the directory exists
Diffstat (limited to '')
| -rw-r--r-- | src/common/file_util.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/common/file_util.cpp b/src/common/file_util.cpp index d5f6ea2ee..c4d738bb6 100644 --- a/src/common/file_util.cpp +++ b/src/common/file_util.cpp | |||
| @@ -98,6 +98,11 @@ bool Delete(const fs::path& path) { | |||
| 98 | bool CreateDir(const fs::path& path) { | 98 | bool CreateDir(const fs::path& path) { |
| 99 | LOG_TRACE(Common_Filesystem, "directory {}", path.string()); | 99 | LOG_TRACE(Common_Filesystem, "directory {}", path.string()); |
| 100 | 100 | ||
| 101 | if (Exists(path)) { | ||
| 102 | LOG_DEBUG(Common_Filesystem, "path exists {}", path.string()); | ||
| 103 | return true; | ||
| 104 | } | ||
| 105 | |||
| 101 | std::error_code ec; | 106 | std::error_code ec; |
| 102 | const bool success = fs::create_directory(path, ec); | 107 | const bool success = fs::create_directory(path, ec); |
| 103 | 108 | ||