summaryrefslogtreecommitdiff
path: root/archival
diff options
context:
space:
mode:
Diffstat (limited to 'archival')
-rw-r--r--archival/tar.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/archival/tar.c b/archival/tar.c
index 836d127..611bbd9 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. */