aboutsummaryrefslogtreecommitdiff
path: root/tar.c
diff options
context:
space:
mode:
authorandersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277>2000-06-28 16:56:25 +0000
committerandersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277>2000-06-28 16:56:25 +0000
commit5375ead982f5611573ea8b1f9e171e562bd65457 (patch)
tree55bc210e98047006b69c5d3831eb3b3fbcfdc576 /tar.c
parent61e199e44c85b27893b710721397709a5f31ac86 (diff)
downloadbusybox-w32-5375ead982f5611573ea8b1f9e171e562bd65457.tar.gz
busybox-w32-5375ead982f5611573ea8b1f9e171e562bd65457.tar.bz2
busybox-w32-5375ead982f5611573ea8b1f9e171e562bd65457.zip
* Fixed a _horrible_ bug where 'tar -tvf' could unlink
local files!!! Fix thanks to Marius Groeger <mgroeger@sysgo.de> * Added support for "sh -c command args...", also thanks to Marius Groeger <mgroeger@sysgo.de> -Erik git-svn-id: svn://busybox.net/trunk/busybox@715 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'tar.c')
-rw-r--r--tar.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tar.c b/tar.c
index 836d127e7..611bbd9a0 100644
--- a/tar.c
+++ b/tar.c
@@ -648,7 +648,8 @@ static int readTarFile(const char* tarName, int extractFlag, int listFlag,
648 } 648 }
649 649
650 /* Remove any clutter lying in our way */ 650 /* Remove any clutter lying in our way */
651 unlink( header.name); 651 if (extractFlag == TRUE) /* .. but only if we are extracting (as */
652 unlink( header.name); /* opposed to listing) (rob@sysgo.de) */
652 653
653 /* If we got here, we can be certain we have a legitimate 654 /* If we got here, we can be certain we have a legitimate
654 * header to work with. So work with it. */ 655 * header to work with. So work with it. */