Skip to content

Commit

Permalink
fixes about archive extract
Browse files Browse the repository at this point in the history
  • Loading branch information
sulincix committed May 27, 2024
1 parent 31ec54c commit 2998448
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/ccode/archive-extract.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ static void archive_extract_fn(archive *data, char *path, bool all) {
}
continue;
}
} else {
}else if (S_ISREG(mode)){
FILE *file = fopen(target_file, "wb");
if (file == NULL) {
char* error_msg = build_string("Failed to open file for writing: %s", target_file);
Expand All @@ -139,6 +139,8 @@ static void archive_extract_fn(archive *data, char *path, bool all) {
}
fclose(file);
chmod(target_file, 0755);
} else {
fwarning("Skip unsupported archive entry: %s", entry_path);
}
}
}
Expand Down

0 comments on commit 2998448

Please sign in to comment.