diff options
author | Rob Landley | 2006-06-13 16:09:16 +0000 |
---|---|---|
committer | Rob Landley | 2006-06-13 16:09:16 +0000 |
commit | c4b673994e5e6f358b80fa3eef89e1cc26f60cee (patch) | |
tree | 7ac1ea3670c886924e49dae580c92cc9e21fb3d8 /archival/unlzma.c | |
parent | fd8409f8c5868d15a427f1e042352e7fc5372e35 (diff) | |
download | busybox-c4b673994e5e6f358b80fa3eef89e1cc26f60cee.zip busybox-c4b673994e5e6f358b80fa3eef89e1cc26f60cee.tar.gz |
Use xstat() instead of if(stat()) die()
Diffstat (limited to 'archival/unlzma.c')
-rw-r--r-- | archival/unlzma.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/archival/unlzma.c b/archival/unlzma.c index 404da0a..b4881af 100644 --- a/archival/unlzma.c +++ b/archival/unlzma.c @@ -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 |