summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: bee8e79)
raw | patch | inline | side by side (parent: bee8e79)
author | Johannes Schindelin <Johannes.Schindelin@gmx.de> | |
Sun, 6 Nov 2005 23:36:15 +0000 (00:36 +0100) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Mon, 7 Nov 2005 02:31:46 +0000 (18:31 -0800) |
This fixes a problem in safe_create_leading_directories() when the
argument starts with a '/' (i.e. the path is absolute).
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
argument starts with a '/' (i.e. the path is absolute).
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
sha1_file.c | patch | blob | history |
diff --git a/sha1_file.c b/sha1_file.c
index 642f00d3d47c3d782c3dfe522d21819c1a67de30..946a35346bdaf21432b7f463712f5bf8881fee39 100644 (file)
--- a/sha1_file.c
+++ b/sha1_file.c
int safe_create_leading_directories(char *path)
{
char *pos = path;
+ if (*pos == '/')
+ pos++;
while (pos) {
pos = strchr(pos, '/');