diff options
author | kraai <kraai@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2000-09-01 02:50:48 +0000 |
---|---|---|
committer | kraai <kraai@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2000-09-01 02:50:48 +0000 |
commit | 12cd4c0913cae1f77f807d8b0c44d21d6157f79e (patch) | |
tree | 6d6efc8106121e2cb8f88363ff5f521878db7910 /tar.c | |
parent | 8ea5a6684695803d0ebc3be238692e885600e919 (diff) | |
download | busybox-w32-12cd4c0913cae1f77f807d8b0c44d21d6157f79e.tar.gz busybox-w32-12cd4c0913cae1f77f807d8b0c44d21d6157f79e.tar.bz2 busybox-w32-12cd4c0913cae1f77f807d8b0c44d21d6157f79e.zip |
Don't unlink files if we are extracting to stdout.
git-svn-id: svn://busybox.net/trunk/busybox@992 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'tar.c')
-rw-r--r-- | tar.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -600,9 +600,9 @@ static int readTarFile(const char* tarName, int extractFlag, int listFlag, | |||
600 | printf("\n"); | 600 | printf("\n"); |
601 | } | 601 | } |
602 | 602 | ||
603 | /* Remove any clutter lying in our way */ | 603 | /* Remove files if we would overwrite them */ |
604 | if (extractFlag == TRUE) /* .. but only if we are extracting (as */ | 604 | if (extractFlag == TRUE && tostdOut == FALSE) |
605 | unlink( header.name); /* opposed to listing) (rob@sysgo.de) */ | 605 | unlink(header.name); |
606 | 606 | ||
607 | /* If we got here, we can be certain we have a legitimate | 607 | /* If we got here, we can be certain we have a legitimate |
608 | * header to work with. So work with it. */ | 608 | * header to work with. So work with it. */ |