From eedbe58aafde793cae77d1f993b9b24099a62ecd Mon Sep 17 00:00:00 2001 From: Ron Yorston Date: Mon, 26 Feb 2018 11:30:24 +0000 Subject: 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. --- archival/tar.c | 4 ++++ 1 file changed, 4 insertions(+) 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 { # endif HardLinkInfo *hlInfoHead; /* Hard Link Tracking Information */ HardLinkInfo *hlInfo; /* Hard Link Info for the current file */ +#if !ENABLE_PLATFORM_MINGW32 //TODO: save only st_dev + st_ino struct stat tarFileStatBuf; /* Stat info for the tarball, letting * us know the inode and device that the * tarball lives, so we can avoid trying * to include the tarball into itself */ +#endif } TarBallInfo; /* A nice enum with all the possible tar file content types */ @@ -696,9 +698,11 @@ static NOINLINE int writeTarFile( /*tbInfo->hlInfoHead = NULL; - already is */ +#if !ENABLE_PLATFORM_MINGW32 /* Store the stat info for the tarball's file, so * can avoid including the tarball into itself.... */ xfstat(tbInfo->tarFd, &tbInfo->tarFileStatBuf, "can't stat tar file"); +#endif # if SEAMLESS_COMPRESSION if (gzip) -- cgit v1.2.3-55-g6feb