]> asedeno.scripts.mit.edu Git - git.git/blobdiff - path.c
Merge branch 'cb/http-test'
[git.git] / path.c
diff --git a/path.c b/path.c
index 42609524a55ad017557d48bedf26906cc4405d0a..af2716199b92e920df9fe2021035d319e8cafbc6 100644 (file)
--- a/path.c
+++ b/path.c
@@ -311,8 +311,10 @@ const char *make_absolute_path(const char *path)
                        if (last_slash) {
                                *last_slash = '\0';
                                last_elem = xstrdup(last_slash + 1);
-                       } else
+                       } else {
                                last_elem = xstrdup(buf);
+                               *buf = '\0';
+                       }
                }
 
                if (*buf) {