svn commit: trunk/busybox/archival
vda at busybox.net
vda at busybox.net
Mon Sep 24 12:32:54 PDT 2007
Author: vda
Date: 2007-09-24 12:32:53 -0700 (Mon, 24 Sep 2007)
New Revision: 19995
Log:
tar: add a comment about previous subtle fix
Modified:
trunk/busybox/archival/tar.c
Changeset:
Modified: trunk/busybox/archival/tar.c
===================================================================
--- trunk/busybox/archival/tar.c 2007-09-24 19:07:57 UTC (rev 19994)
+++ trunk/busybox/archival/tar.c 2007-09-24 19:32:53 UTC (rev 19995)
@@ -386,6 +386,7 @@
const char *header_name;
int inputFileFd = -1;
+ /* Strip leading '/' (must be before memorizing hardlink's name) */
header_name = fileName;
while (header_name[0] == '/') {
static smallint warned;
@@ -400,6 +401,12 @@
if (header_name[0] == '\0')
return TRUE;
+ /* It is against the rules to archive a socket */
+ if (S_ISSOCK(statbuf->st_mode)) {
+ bb_error_msg("%s: socket ignored", fileName);
+ return TRUE;
+ }
+
/*
* Check to see if we are dealing with a hard link.
* If so -
@@ -414,12 +421,6 @@
addHardLinkInfo(&tbInfo->hlInfoHead, statbuf, header_name);
}
- /* It is against the rules to archive a socket */
- if (S_ISSOCK(statbuf->st_mode)) {
- bb_error_msg("%s: socket ignored", fileName);
- return TRUE;
- }
-
/* It is a bad idea to store the archive we are in the process of creating,
* so check the device and inode to be sure that this particular file isn't
* the new tarball */
More information about the busybox-cvs
mailing list