diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2017-06-14 16:00:39 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2017-06-14 16:12:14 +0200 |
commit | 228c319a944b0ba7c835b1909ee1c2056c652eb1 (patch) | |
tree | da55fe8768d943b98dc0b78cd1a8b213be369399 /src/util.cpp | |
parent | c94b89e90d6af3911f581addd8767466bc74a564 (diff) | |
parent | 1d1ea9f0962a331c21a3029a0302e5906a396f56 (diff) |
Merge #9895: Turn TryCreateDirectory() into TryCreateDirectories()
1d1ea9f Turn TryCreateDirectory() into TryCreateDirectories() (Marko Bencun)
Tree-SHA512: 49a524167bcf66e351a964c88d09cb3bcee12769a32da83410e3ba649fa4bcdbf0478d41e4d09bb55adb9b3f122e742271db6feb30bbafe2a7973542b5f10f79
Diffstat (limited to 'src/util.cpp')
-rw-r--r-- | src/util.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/util.cpp b/src/util.cpp index 0a14e8bb9e..20a8082017 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -651,21 +651,21 @@ bool RenameOver(fs::path src, fs::path dest) } /** - * Ignores exceptions thrown by Boost's create_directory if the requested directory exists. + * Ignores exceptions thrown by Boost's create_directories if the requested directory exists. * Specifically handles case where path p exists, but it wasn't possible for the user to * write to the parent directory. */ -bool TryCreateDirectory(const fs::path& p) +bool TryCreateDirectories(const fs::path& p) { try { - return fs::create_directory(p); + return fs::create_directories(p); } catch (const fs::filesystem_error&) { if (!fs::exists(p) || !fs::is_directory(p)) throw; } - // create_directory didn't create the directory, it had to have existed already + // create_directories didn't create the directory, it had to have existed already return false; } |