diff options
author | Colin Cross <ccross@android.com> | 2015-12-16 23:29:02 (GMT) |
---|---|---|
committer | Colin Cross <ccross@android.com> | 2015-12-16 23:35:53 (GMT) |
commit | 5b910df397c6937552a6f3dee600da69c49702e2 (patch) | |
tree | a1d4e84664578f97ce51c2704449787f3fded85c /src/util.cc | |
parent | 4ffe56d387dce2bc5126fc4079ad2f2b31fba30e (diff) | |
download | Ninja-5b910df397c6937552a6f3dee600da69c49702e2.zip Ninja-5b910df397c6937552a6f3dee600da69c49702e2.tar.gz Ninja-5b910df397c6937552a6f3dee600da69c49702e2.tar.bz2 |
Canonicalize "." to "."
"." is a legal path, if the string is empty after canonicalization
return ".".
Diffstat (limited to 'src/util.cc')
-rw-r--r-- | src/util.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/util.cc b/src/util.cc index d150fe2..e31fd1f 100644 --- a/src/util.cc +++ b/src/util.cc @@ -226,8 +226,8 @@ bool CanonicalizePath(char* path, size_t* len, unsigned int* slash_bits, } if (dst == start) { - *err = "path canonicalizes to the empty path"; - return false; + *dst++ = '.'; + *dst++ = '\0'; } *len = dst - start - 1; |