mirror of
https://github.com/topjohnwu/ndk-busybox.git
synced 2024-12-13 14:36:00 +00:00
Don't unlink files if we are extracting to stdout.
This commit is contained in:
parent
e99674a70f
commit
f446297afd
@ -600,9 +600,9 @@ static int readTarFile(const char* tarName, int extractFlag, int listFlag,
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
/* Remove any clutter lying in our way */
|
||||
if (extractFlag == TRUE) /* .. but only if we are extracting (as */
|
||||
unlink( header.name); /* opposed to listing) (rob@sysgo.de) */
|
||||
/* Remove files if we would overwrite them */
|
||||
if (extractFlag == TRUE && tostdOut == FALSE)
|
||||
unlink(header.name);
|
||||
|
||||
/* If we got here, we can be certain we have a legitimate
|
||||
* header to work with. So work with it. */
|
||||
|
6
tar.c
6
tar.c
@ -600,9 +600,9 @@ static int readTarFile(const char* tarName, int extractFlag, int listFlag,
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
/* Remove any clutter lying in our way */
|
||||
if (extractFlag == TRUE) /* .. but only if we are extracting (as */
|
||||
unlink( header.name); /* opposed to listing) (rob@sysgo.de) */
|
||||
/* Remove files if we would overwrite them */
|
||||
if (extractFlag == TRUE && tostdOut == FALSE)
|
||||
unlink(header.name);
|
||||
|
||||
/* If we got here, we can be certain we have a legitimate
|
||||
* header to work with. So work with it. */
|
||||
|
Loading…
Reference in New Issue
Block a user