aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--utility.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/utility.c b/utility.c
index 6d7fa955b..10e107fc5 100644
--- a/utility.c
+++ b/utility.c
@@ -548,7 +548,8 @@ extern int createPath (const char *name, int mode)
int retVal=0;
strcpy( buf, name);
- cp = strchr(buf, '/');
+ for (cp = buf; *cp == '/'; cp++);
+ cp = strchr(cp, '/');
while (cp) {
cpOld = cp;
cp = strchr(cp + 1, '/');