summaryrefslogtreecommitdiffhomepage
path: root/archival/cpio.c
diff options
context:
space:
mode:
Diffstat (limited to 'archival/cpio.c')
-rw-r--r--archival/cpio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/archival/cpio.c b/archival/cpio.c
index ebe911a96..37b6b5cce 100644
--- a/archival/cpio.c
+++ b/archival/cpio.c
@@ -287,7 +287,7 @@ int cpio_main(int argc UNUSED_PARAM, char **argv)
bb_show_usage();
if (opt & CPIO_OPT_FILE) {
fclose(stdout);
- stdout = fopen(cpio_filename, "w");
+ stdout = fopen_for_write(cpio_filename);
/* Paranoia: I don't trust libc that much */
xdup2(fileno(stdout), STDOUT_FILENO);
}