aboutsummaryrefslogtreecommitdiff
path: root/path.c
diff options
context:
space:
mode:
authorJohannes Sixt <johannes.sixt@telecom.at>2008-06-08 16:34:40 +0200
committerJunio C Hamano <gitster@pobox.com>2008-06-08 10:48:01 -0700
commite048a49f96172aecec96a5821a2177cbd49a24ed (patch)
tree07fdff1bd3bb50304586c704550cb9508d5d498f /path.c
parent218bf69f0b137e0a21cfeeda6ba81947f220401f (diff)
downloadgit-e048a49f96172aecec96a5821a2177cbd49a24ed.tar.gz
git-e048a49f96172aecec96a5821a2177cbd49a24ed.tar.xz
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>
Diffstat (limited to 'path.c')
-rw-r--r--path.c2
1 files changed, 1 insertions, 1 deletions
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 {