Use xstat() instead of if(stat()) die()

This commit is contained in:
Rob Landley
2006-06-13 16:09:16 +00:00
parent fd8409f8c5
commit c4b673994e
3 changed files with 5 additions and 13 deletions

View File

@@ -47,10 +47,7 @@ int unlzma_main(int argc, char **argv)
if (strcmp(extension, ".lzma") != 0) {
bb_error_msg_and_die("Invalid extension");
}
/* TODO: xstat? */
if (stat(filename, &stat_buf) < 0) {
bb_error_msg_and_die("Couldn't stat file %s", filename);
}
xstat(filename, &stat_buf);
*extension = 0;
dst_fd = bb_xopen3(filename, O_WRONLY | O_CREAT, stat_buf.st_mode);
} else