aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2018-02-26 11:30:24 +0000
committerRon Yorston <rmy@pobox.com>2018-02-26 11:30:24 +0000
commiteedbe58aafde793cae77d1f993b9b24099a62ecd (patch)
tree95b4cad5e6ca3a58c8c64f57cfb96e3666b96715
parent00f2d33f37da42e17e5d978958659c4899cb2f0a (diff)
downloadbusybox-w32-eedbe58aafde793cae77d1f993b9b24099a62ecd.tar.gz
busybox-w32-eedbe58aafde793cae77d1f993b9b24099a62ecd.tar.bz2
busybox-w32-eedbe58aafde793cae77d1f993b9b24099a62ecd.zip
tar: don't save file status
Since we're unable to track the file using its device/inode there's no need to obtain the file's status.
-rw-r--r--archival/tar.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/archival/tar.c b/archival/tar.c
index be688a81d..990755429 100644
--- a/archival/tar.c
+++ b/archival/tar.c
@@ -161,11 +161,13 @@ typedef struct TarBallInfo {
161# endif 161# endif
162 HardLinkInfo *hlInfoHead; /* Hard Link Tracking Information */ 162 HardLinkInfo *hlInfoHead; /* Hard Link Tracking Information */
163 HardLinkInfo *hlInfo; /* Hard Link Info for the current file */ 163 HardLinkInfo *hlInfo; /* Hard Link Info for the current file */
164#if !ENABLE_PLATFORM_MINGW32
164//TODO: save only st_dev + st_ino 165//TODO: save only st_dev + st_ino
165 struct stat tarFileStatBuf; /* Stat info for the tarball, letting 166 struct stat tarFileStatBuf; /* Stat info for the tarball, letting
166 * us know the inode and device that the 167 * us know the inode and device that the
167 * tarball lives, so we can avoid trying 168 * tarball lives, so we can avoid trying
168 * to include the tarball into itself */ 169 * to include the tarball into itself */
170#endif
169} TarBallInfo; 171} TarBallInfo;
170 172
171/* A nice enum with all the possible tar file content types */ 173/* A nice enum with all the possible tar file content types */
@@ -696,9 +698,11 @@ static NOINLINE int writeTarFile(
696 698
697 /*tbInfo->hlInfoHead = NULL; - already is */ 699 /*tbInfo->hlInfoHead = NULL; - already is */
698 700
701#if !ENABLE_PLATFORM_MINGW32
699 /* Store the stat info for the tarball's file, so 702 /* Store the stat info for the tarball's file, so
700 * can avoid including the tarball into itself.... */ 703 * can avoid including the tarball into itself.... */
701 xfstat(tbInfo->tarFd, &tbInfo->tarFileStatBuf, "can't stat tar file"); 704 xfstat(tbInfo->tarFd, &tbInfo->tarFileStatBuf, "can't stat tar file");
705#endif
702 706
703# if SEAMLESS_COMPRESSION 707# if SEAMLESS_COMPRESSION
704 if (gzip) 708 if (gzip)