Skip to content

Commit

Permalink
Bug 392722 - nsinstall doesn't work if paths have double slashes, pat…
Browse files Browse the repository at this point in the history
…ch by Fabien Tassin <[email protected]>, r=me
  • Loading branch information
bsmedberg committed Aug 29, 2007
1 parent 6c32628 commit f21d8c2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions config/nsinstall.c
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,7 @@ mkdirs(char *path, mode_t mode)

while (*path == '/' && path[1] == '/')
path++;
while ((cp = strrchr(path, '/')) && cp[1] == '\0')
*cp = '\0';
for (cp = strrchr(path, '/'); cp && cp != path && *(cp - 1) == '/'; cp--);
if (cp && cp != path) {
*cp = '\0';
if ((lstat(path, &sb) < 0 || !S_ISDIR(sb.st_mode)) &&
Expand Down

0 comments on commit f21d8c2

Please sign in to comment.