diff options
Diffstat (limited to 'src/main/cpp')
-rw-r--r-- | src/main/cpp/blaze_util.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/cpp/blaze_util.cc b/src/main/cpp/blaze_util.cc index f1126db5bc..912f825680 100644 --- a/src/main/cpp/blaze_util.cc +++ b/src/main/cpp/blaze_util.cc @@ -63,9 +63,10 @@ string GetUserName() { // If called from working directory "/bar": // MakeAbsolute("foo") --> "/bar/foo" // MakeAbsolute("/foo") ---> "/foo" +// MakeAbsolute("C:/foo") ---> "C:/foo" string MakeAbsolute(const string &path) { // Check if path is already absolute. - if (path.empty() || path[0] == '/') { + if (path.empty() || path[0] == '/' || (isalpha(path[0]) && path[1] == ':')) { return path; } |