mirror of
https://github.com/sheumann/hush.git
synced 2024-09-12 15:54:56 +00:00
* Fixed a small bug that could cause tar to emit warning messages
and not extract the first file in a directory in some cases of nested directories. Thanks to Kevin Traas <kevin@netmaster.com> for helping track this one down. -Erik
This commit is contained in:
parent
b3d235f63b
commit
0c6a970eb2
@ -67,6 +67,10 @@
|
||||
Pavel Roskin
|
||||
* Syslogd will not go to background if "-n" is given. Better help
|
||||
and argument checking -- Pavel Roskin
|
||||
* Fixed a small bug that could cause tar to emit warning messages
|
||||
and not extract the first file in a directory in some cases
|
||||
of nested directories. Thanks to Kevin Traas <kevin@netmaster.com>
|
||||
for helping track this one down.
|
||||
* More doc updates
|
||||
|
||||
|
||||
|
@ -300,11 +300,14 @@ tarExtractRegularFile(TarInfo *header, int extractFlag, int tostdoutFlag)
|
||||
|
||||
/* Open the file to be written, if a file is supposed to be written */
|
||||
if (extractFlag==TRUE && tostdoutFlag==FALSE) {
|
||||
if ((outFd=open(header->name, O_CREAT|O_TRUNC|O_WRONLY, header->mode & ~S_IFMT)) < 0)
|
||||
errorMsg(io_error, header->name, strerror(errno));
|
||||
/* Create the path to the file, just in case it isn't there...
|
||||
* This should not screw up path permissions or anything. */
|
||||
createPath(header->name, 0777);
|
||||
if ((outFd=open(header->name, O_CREAT|O_TRUNC|O_WRONLY,
|
||||
header->mode & ~S_IFMT)) < 0) {
|
||||
errorMsg(io_error, header->name, strerror(errno));
|
||||
return( FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
/* Write out the file, if we are supposed to be doing that */
|
||||
|
7
tar.c
7
tar.c
@ -300,11 +300,14 @@ tarExtractRegularFile(TarInfo *header, int extractFlag, int tostdoutFlag)
|
||||
|
||||
/* Open the file to be written, if a file is supposed to be written */
|
||||
if (extractFlag==TRUE && tostdoutFlag==FALSE) {
|
||||
if ((outFd=open(header->name, O_CREAT|O_TRUNC|O_WRONLY, header->mode & ~S_IFMT)) < 0)
|
||||
errorMsg(io_error, header->name, strerror(errno));
|
||||
/* Create the path to the file, just in case it isn't there...
|
||||
* This should not screw up path permissions or anything. */
|
||||
createPath(header->name, 0777);
|
||||
if ((outFd=open(header->name, O_CREAT|O_TRUNC|O_WRONLY,
|
||||
header->mode & ~S_IFMT)) < 0) {
|
||||
errorMsg(io_error, header->name, strerror(errno));
|
||||
return( FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
/* Write out the file, if we are supposed to be doing that */
|
||||
|
Loading…
Reference in New Issue
Block a user