- use bb_xchdir instead of ignoring eventual errors of chdir
[oweals/busybox.git] / archival / gzip.c
index 4f60c6b244634e7fe276b32a2084be835ce5ed32..91b2948917f5658b6ecce5411b5ae3f86711cfd2 100644 (file)
@@ -324,7 +324,7 @@ static void write_buf(int fd, void *buf, unsigned cnt)
        unsigned n;
 
        while ((n = write(fd, buf, cnt)) != cnt) {
-               if (n == (unsigned) (-1)) bb_error_msg_and_die("can't write");
+               if (n == (unsigned) (-1)) bb_error_msg_and_die(bb_msg_write_error);
                cnt -= n;
                buf = (void *) ((char *) buf + n);
        }