aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Kraai <kraai@debian.org>2000-09-01 02:50:48 +0000
committerMatt Kraai <kraai@debian.org>2000-09-01 02:50:48 +0000
commitf446297afd6b1d0c2558038f198a929082f820f7 (patch)
tree6d6efc8106121e2cb8f88363ff5f521878db7910
parente99674a70fa444e2b6e5d4db9e66113c7df76508 (diff)
downloadbusybox-w32-f446297afd6b1d0c2558038f198a929082f820f7.tar.gz
busybox-w32-f446297afd6b1d0c2558038f198a929082f820f7.tar.bz2
busybox-w32-f446297afd6b1d0c2558038f198a929082f820f7.zip
Don't unlink files if we are extracting to stdout.
-rw-r--r--archival/tar.c6
-rw-r--r--tar.c6
2 files changed, 6 insertions, 6 deletions
diff --git a/archival/tar.c b/archival/tar.c
index cab53aa10..597e9b80d 100644
--- a/archival/tar.c
+++ b/archival/tar.c
@@ -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. */
diff --git a/tar.c b/tar.c
index cab53aa10..597e9b80d 100644
--- a/tar.c
+++ b/tar.c
@@ -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. */