summaryrefslogtreecommitdiff
path: root/tar.c
diff options
context:
space:
mode:
authorGlenn L McGrath2001-03-28 23:57:51 +0000
committerGlenn L McGrath2001-03-28 23:57:51 +0000
commitae8ad35590ad2b82232920c94a0e2317e4008552 (patch)
tree95fa4c0a84095894fd214d59cdb7219e7185aa03 /tar.c
parente0a7f917c293fbde421fbdffc9cb3dd47ff14ee2 (diff)
downloadbusybox-ae8ad35590ad2b82232920c94a0e2317e4008552.zip
busybox-ae8ad35590ad2b82232920c94a0e2317e4008552.tar.gz
Fixes from Robert Kaiser
Diffstat (limited to 'tar.c')
-rw-r--r--tar.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/tar.c b/tar.c
index 9be63ce..fb8d844 100644
--- a/tar.c
+++ b/tar.c
@@ -292,12 +292,13 @@ extern int tar_main(int argc, char **argv)
status = readTarFile(tarFd, extractFlag, listFlag, tostdoutFlag,
verboseFlag, extractList, excludeList);
close(tarFd);
- }
-
#ifdef BB_FEATURE_TAR_GZIP
- gz_close(pid);
- fclose(comp_file);
+ if (unzipFlag == TRUE) {
+ gz_close(pid);
+ fclose(comp_file);
+ }
#endif
+ }
if (status == TRUE)
return EXIT_SUCCESS;