* 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. */
| 1007 | * write to the parent directory. |
| 1008 | */ |
| 1009 | bool TryCreateDirectories(const fs::path& p) |
| 1010 | { |
| 1011 | try |
| 1012 | { |
| 1013 | return fs::create_directories(p); |
| 1014 | } catch (const fs::filesystem_error&) { |
| 1015 | if (!fs::exists(p) || !fs::is_directory(p)) |
| 1016 | throw; |
| 1017 | } |
| 1018 | |
| 1019 | // create_directories didn't create the directory, it had to have existed already |
| 1020 | return false; |
| 1021 | } |
| 1022 | |
| 1023 | bool FileCommit(FILE *file) |
| 1024 | { |
no outgoing calls
no test coverage detected