aboutsummaryrefslogtreecommitdiff
path: root/tar.c
diff options
context:
space:
mode:
authorerik <erik@69ca8d6d-28ef-0310-b511-8ec308f3f277>1999-12-28 00:17:46 +0000
committererik <erik@69ca8d6d-28ef-0310-b511-8ec308f3f277>1999-12-28 00:17:46 +0000
commit898c196830650885c57938949e159465451508e3 (patch)
treeca61fc301d4f1ee06b0a03bd352b672360b88eda /tar.c
parent2172786669d3e335bd3595886a309662a1adaf37 (diff)
downloadbusybox-w32-898c196830650885c57938949e159465451508e3.tar.gz
busybox-w32-898c196830650885c57938949e159465451508e3.tar.bz2
busybox-w32-898c196830650885c57938949e159465451508e3.zip
Fixed a bug where tar would not set the user and group on device
special files. -Erik git-svn-id: svn://busybox.net/trunk/busybox@265 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'tar.c')
-rw-r--r--tar.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/tar.c b/tar.c
index bff248212..7167d95cd 100644
--- a/tar.c
+++ b/tar.c
@@ -577,17 +577,15 @@ readHeader (const TarHeader * hp, int fileCount, char **fileTable)
577 } else { 577 } else {
578 outFd = open (name, O_WRONLY | O_CREAT | O_TRUNC, mode); 578 outFd = open (name, O_WRONLY | O_CREAT | O_TRUNC, mode);
579 } 579 }
580 if (outFd < 0) {
581 perror (name);
582 skipFileFlag = TRUE;
583 return;
584 }
585 chown(name, uid, gid);
586 chmod(name, mode);
580 } 587 }
581 588
582 if (outFd < 0) {
583 perror (name);
584 skipFileFlag = TRUE;
585 return;
586 }
587 if (tostdoutFlag == FALSE) {
588 fchown(outFd, uid, gid);
589 fchmod(outFd, mode);
590 }
591 589
592 /* 590 /*
593 * If the file is empty, then that's all we need to do. 591 * If the file is empty, then that's all we need to do.