* 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
This commit is contained in:
Eric Andersen
2000-06-28 16:56:25 +00:00
parent 47cac6779a
commit 1c314ad655
6 changed files with 177 additions and 63 deletions

View File

@@ -648,7 +648,8 @@ static int readTarFile(const char* tarName, int extractFlag, int listFlag,
}
/* Remove any clutter lying in our way */
unlink( header.name);
if (extractFlag == TRUE) /* .. but only if we are extracting (as */
unlink( header.name); /* opposed to listing) (rob@sysgo.de) */
/* If we got here, we can be certain we have a legitimate
* header to work with. So work with it. */