Move get_unaligned_le32() macros to platform.h
[oweals/busybox.git] / archival / libarchive / open_transformer.c
index dd15a9b1f559b743c27913bb3439361ceee8b61b..ac7e5db95f5aa7db9184b6400d50477141be8aa1 100644 (file)
@@ -302,7 +302,7 @@ int FAST_FUNC open_zipped(const char *fname, int fail_if_not_compressed)
        xstate->signature_skipped = 0;
        if (xstate->xformer) {
                fork_transformer_with_sig(fd, xstate->xformer, xstate->xformer_prog);
-       } /* esle: the file is not compressed */
+       } /* else: the file is not compressed */
 # endif
 
        free(xstate);
@@ -331,6 +331,9 @@ void* FAST_FUNC xmalloc_open_zipped_read_close(const char *fname, size_t *maxsz_
                }
        } else {
                /* File is not compressed */
+//FIXME: avoid seek
+               xlseek(xstate->src_fd, - xstate->signature_skipped, SEEK_CUR);
+               xstate->signature_skipped = 0;
                image = xmalloc_read(xstate->src_fd, maxsz_p);
        }