summaryrefslogtreecommitdiff
path: root/setup.c
diff options
context:
space:
mode:
authorSteffen Prohaska <prohaska@zib.de>2007-11-25 23:29:03 +0100
committerJunio C Hamano <gitster@pobox.com>2007-11-26 12:32:05 -0800
commitecf4831d89ba6986249e1bf232b2e2f5f7536223 (patch)
treeffb6be8a679cd9bb2b9edfd2699966a15284da63 /setup.c
parente0fda6abd11c567b72f29ec0ee06c541404a9cb7 (diff)
downloadgit-ecf4831d89ba6986249e1bf232b2e2f5f7536223.tar.gz
Use is_absolute_path() in diff-lib.c, lockfile.c, setup.c, trace.c
Using the helper function to test for absolute paths makes porting easier. Signed-off-by: Steffen Prohaska <prohaska@zib.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'setup.c')
-rw-r--r--setup.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/setup.c b/setup.c
index 43cd3f94ea..2c7b5cb200 100644
--- a/setup.c
+++ b/setup.c
@@ -59,7 +59,7 @@ const char *prefix_path(const char *prefix, int len, const char *path)
const char *prefix_filename(const char *pfx, int pfx_len, const char *arg)
{
static char path[PATH_MAX];
- if (!pfx || !*pfx || arg[0] == '/')
+ if (!pfx || !*pfx || is_absolute_path(arg))
return arg;
memcpy(path, pfx, pfx_len);
strcpy(path + pfx_len, arg);