diff options
Diffstat (limited to 'src/util.cc')
-rw-r--r-- | src/util.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/util.cc b/src/util.cc index 14f6265..580f22a 100644 --- a/src/util.cc +++ b/src/util.cc @@ -110,8 +110,19 @@ bool CanonicalizePath(char* path, size_t* len, string* err) { const char* end = start + *len; if (*src == '/') { +#ifdef _WIN32 + // network path starts with // + if (*len > 1 && *(src + 1) == '/') { + src += 2; + dst += 2; + } else { + ++src; + ++dst; + } +#else ++src; ++dst; +#endif } while (src < end) { |