diff options
author | Eric Andersen <andersen@codepoet.org> | 2000-06-28 20:56:25 +0400 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2000-06-28 20:56:25 +0400 |
commit | 1c314ad655af140b8ef4a271f4e657bf50218236 (patch) | |
tree | 55bc210e98047006b69c5d3831eb3b3fbcfdc576 /archival | |
parent | 47cac6779a4457e29b956aa864f0292fa7706bc1 (diff) |
* 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
Diffstat (limited to 'archival')
-rw-r--r-- | archival/tar.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/archival/tar.c b/archival/tar.c index 836d127e7..611bbd9a0 100644 --- a/archival/tar.c +++ b/archival/tar.c @@ -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. */ |