Unverified Commit fa252ec2 authored by Feng Xiao's avatar Feng Xiao Committed by GitHub

Merge pull request #5024 from greenhouse-org/fix-windows-path

Fix TryCreateParentDirectory on Windows
parents 9590dd2c bf784289
......@@ -168,7 +168,8 @@ bool VerifyDirectoryExists(const string& path) {
// directories listed in |filename|.
bool TryCreateParentDirectory(const string& prefix, const string& filename) {
// Recursively create parent directories to the output file.
std::vector<string> parts = Split(filename, "/", true);
// On Windows, both '/' and '\' are valid path separators.
std::vector<string> parts = Split(filename, "/\\", true);
string path_so_far = prefix;
for (int i = 0; i < parts.size() - 1; i++) {
path_so_far += parts[i];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment