make_nonrelative_path: Use is_absolute_path()
This helps porting to Windows. Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Johannes Sixt committed
Jun 8, 2008 at 16:34 UTC
e048a49f96172aecec96a5821a2177cbd49a24ed
1 file changed
+1
-1
path.c
+1
-1
@@ -314,7 +314,7 @@ const char *make_nonrelative_path(const char *path)
314
{
315
static char buf[PATH_MAX + 1];
316
317
- if (path[0] == '/') {
317
+ if (is_absolute_path(path)) {
318
if (strlcpy(buf, path, PATH_MAX) >= PATH_MAX)
319
die ("Too long path: %.*s", 60, path);
320
} else {