From: Johannes Sixt Date: Sun, 8 Jun 2008 14:34:40 +0000 (+0200) Subject: make_nonrelative_path: Use is_absolute_path() X-Git-Tag: v1.5.6-rc3~50 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=e048a49f96172aecec96a5821a2177cbd49a24ed;p=git.git make_nonrelative_path: Use is_absolute_path() This helps porting to Windows. Signed-off-by: Johannes Sixt Signed-off-by: Junio C Hamano --- diff --git a/path.c b/path.c index 4945f2abc..7a35a26a1 100644 --- a/path.c +++ b/path.c @@ -314,7 +314,7 @@ const char *make_nonrelative_path(const char *path) { static char buf[PATH_MAX + 1]; - if (path[0] == '/') { + if (is_absolute_path(path)) { if (strlcpy(buf, path, PATH_MAX) >= PATH_MAX) die ("Too long path: %.*s", 60, path); } else {