* Ignores exceptions thrown by Boost's create_directory 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. */
| 585 | * write to the parent directory. |
| 586 | */ |
| 587 | bool TryCreateDirectory(const boost::filesystem::path& p) |
| 588 | { |
| 589 | try |
| 590 | { |
| 591 | return boost::filesystem::create_directory(p); |
| 592 | } catch (const boost::filesystem::filesystem_error&) { |
| 593 | if (!boost::filesystem::exists(p) || !boost::filesystem::is_directory(p)) |
| 594 | throw; |
| 595 | } |
| 596 | |
| 597 | // create_directory didn't create the directory, it had to have existed already |
| 598 | return false; |
| 599 | } |
| 600 | |
| 601 | void FileCommit(FILE *fileout) |
| 602 | { |
no outgoing calls
no test coverage detected