diff options
author | Denis Vlasenko | 2008-02-14 08:52:30 +0000 |
---|---|---|
committer | Denis Vlasenko | 2008-02-14 08:52:30 +0000 |
commit | 12c0622231aa9b2e08b27364095d2e5bd4faf2c1 (patch) | |
tree | ce364a4f053c6f759098a2dd52cc6fb80a285c08 /archival/libunarchive | |
parent | b5ee8db9b55eeeab542d6263d67aac12ffcb5e5b (diff) | |
download | busybox-12c0622231aa9b2e08b27364095d2e5bd4faf2c1.zip busybox-12c0622231aa9b2e08b27364095d2e5bd4faf2c1.tar.gz |
tar: do "short EOF" compat only if CONFIG_DESKTOP.
ash: add a comment about new minor bug
Diffstat (limited to 'archival/libunarchive')
-rw-r--r-- | archival/libunarchive/get_header_tar.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/archival/libunarchive/get_header_tar.c b/archival/libunarchive/get_header_tar.c index 7493d91..5a1f594 100644 --- a/archival/libunarchive/get_header_tar.c +++ b/archival/libunarchive/get_header_tar.c @@ -90,15 +90,22 @@ char get_header_tar(archive_handle_t *archive_handle) again_after_align: +#if ENABLE_DESKTOP i = full_read(archive_handle->src_fd, &tar, 512); /* if GNU tar sees EOF in above read, it says: * "tar: A lone zero block at N", where N = kilobyte * where EOF was met (not EOF block, actual EOF!), - * and tar will exit with error code 0! Mimic exit(0): */ + * and tar will exit with error code 0. + * We will mimic exit(0), although we will not mimic + * the message and we don't check whether we indeed + * saw zero block directly before this. */ if (i == 0) xfunc_error_retval = 0; if (i != 512) bb_error_msg_and_die("short read"); +#else + xread(archive_handle->src_fd, &tar, 512); +#endif archive_handle->offset += 512; /* If there is no filename its an empty header */ |