* 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. */
| 676 | * write to the parent directory. |
| 677 | */ |
| 678 | bool TryCreateDirectory(const boost::filesystem::path& p) |
| 679 | { |
| 680 | try { |
| 681 | return boost::filesystem::create_directory(p); |
| 682 | } catch (boost::filesystem::filesystem_error& e) { |
| 683 | if (!boost::filesystem::exists(p) || !boost::filesystem::is_directory(p)) |
| 684 | throw; |
| 685 | } |
| 686 | |
| 687 | // create_directory didn't create the directory, it had to have existed already |
| 688 | return false; |
| 689 | } |
| 690 | |
| 691 | void FileCommit(FILE* fileout) |
| 692 | { |
no outgoing calls
no test coverage detected