t3700: fix broken test under !POSIXPERM
[gitweb.git] / sha1_file.c
index 5457314e6aaaf1a30d33f68c8e1005f8db584564..9c86d1924a23e4c81369f34ec8e1058c2dd15c1f 100644 (file)
@@ -296,7 +296,7 @@ static int link_alt_odb_entry(const char *entry, const char *relative_base,
        }
        strbuf_addstr(&pathbuf, entry);
 
-       if (strbuf_normalize_path(&pathbuf) < 0) {
+       if (strbuf_normalize_path(&pathbuf) < 0 && relative_base) {
                error("unable to normalize alternate object path: %s",
                      pathbuf.buf);
                strbuf_release(&pathbuf);