diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2010-09-20 16:31:37 +1000 |
---|---|---|
committer | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2010-09-20 16:31:37 +1000 |
commit | 2c6bab8c5b25f57589c03027209d37bd3a4fe5e7 (patch) | |
tree | 53921b184df6818c79506fcd27d00555a732f295 | |
parent | c2c480719f91c3ccd477cf0360e78509eb8530df (diff) | |
download | busybox-w32-2c6bab8c5b25f57589c03027209d37bd3a4fe5e7.tar.gz busybox-w32-2c6bab8c5b25f57589c03027209d37bd3a4fe5e7.tar.bz2 busybox-w32-2c6bab8c5b25f57589c03027209d37bd3a4fe5e7.zip |
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.
-rw-r--r-- | archival/tar.c | 2 |
1 files changed, 2 insertions, 0 deletions
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 | |||
416 | } | 416 | } |
417 | } | 417 | } |
418 | 418 | ||
419 | #if !ENABLE_PLATFORM_MINGW32 | ||
419 | /* It is a bad idea to store the archive we are in the process of creating, | 420 | /* It is a bad idea to store the archive we are in the process of creating, |
420 | * so check the device and inode to be sure that this particular file isn't | 421 | * so check the device and inode to be sure that this particular file isn't |
421 | * the new tarball */ | 422 | * the new tarball */ |
@@ -425,6 +426,7 @@ static int FAST_FUNC writeFileToTarball(const char *fileName, struct stat *statb | |||
425 | bb_error_msg("%s: file is the archive; skipping", fileName); | 426 | bb_error_msg("%s: file is the archive; skipping", fileName); |
426 | return TRUE; | 427 | return TRUE; |
427 | } | 428 | } |
429 | #endif | ||
428 | 430 | ||
429 | if (exclude_file(tbInfo->excludeList, header_name)) | 431 | if (exclude_file(tbInfo->excludeList, header_name)) |
430 | return SKIP; | 432 | return SKIP; |