From 2c6bab8c5b25f57589c03027209d37bd3a4fe5e7 Mon Sep 17 00:00:00 2001 From: Nguyễn Thái Ngọc Duy Date: Mon, 20 Sep 2010 16:31:37 +1000 Subject: win32: tar: do not check for archiving the target archive itself While it is generally a good thing to do, st_dev and st_ino on Windows is unreliable (i.e. always zero). This makes tar think every file is the archive it is creating, thus refuse to add them to the archive. --- archival/tar.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/archival/tar.c b/archival/tar.c index 2176ad2ac..1d6e63da0 100644 --- a/archival/tar.c +++ b/archival/tar.c @@ -416,6 +416,7 @@ static int FAST_FUNC writeFileToTarball(const char *fileName, struct stat *statb } } +#if !ENABLE_PLATFORM_MINGW32 /* 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 */ @@ -425,6 +426,7 @@ static int FAST_FUNC writeFileToTarball(const char *fileName, struct stat *statb bb_error_msg("%s: file is the archive; skipping", fileName); return TRUE; } +#endif if (exclude_file(tbInfo->excludeList, header_name)) return SKIP; -- cgit v1.2.3-55-g6feb