Skip to content

Commit

Permalink
Merge branch 'master' of github.com:fragglet/lhasa
Browse files Browse the repository at this point in the history
  • Loading branch information
fragglet committed Apr 22, 2012
2 parents 13e4f94 + 0016e79 commit 13e7992
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/extract.c
Expand Up @@ -228,7 +228,7 @@ static int check_parent_directory(char *path)
case LHA_FILE_NONE:
// Create the missing directory:

if (lha_arch_mkdir(path, 0755) != 0) {
if (!lha_arch_mkdir(path, 0755)) {
fprintf(stderr,
"Failed to create parent directory %s\n",
path);
Expand Down Expand Up @@ -257,6 +257,14 @@ static int make_parent_directories(char *path)
int result;
char *p;

while (path[0] == '/') {
++path;
}

if (path[0] == '\0') {
return 1;
}

result = 1;
path = strdup(path);

Expand Down

0 comments on commit 13e7992

Please sign in to comment.