[git commit master] libunarchive: fix reversed test for older/newer
Denys Vlasenko
vda.linux at googlemail.com
Tue Nov 24 00:16:12 UTC 2009
commit: http://git.busybox.net/busybox/commit/?id=6ccaa23f2be25b3e1ff4c6f5f9bef69a4cb36f8c
branch: http://git.busybox.net/busybox/commit/?id=refs/heads/master
Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
archival/libunarchive/data_extract_all.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/archival/libunarchive/data_extract_all.c b/archival/libunarchive/data_extract_all.c
index 294024b..2fcddc4 100644
--- a/archival/libunarchive/data_extract_all.c
+++ b/archival/libunarchive/data_extract_all.c
@@ -30,13 +30,13 @@ void FAST_FUNC data_extract_all(archive_handle_t *archive_handle)
}
else if (archive_handle->ah_flags & ARCHIVE_EXTRACT_NEWER) {
/* Remove the existing entry if its older than the extracted entry */
- struct stat statbuf;
- if (lstat(file_header->name, &statbuf) == -1) {
+ struct stat existing_sb;
+ if (lstat(file_header->name, &existing_sb) == -1) {
if (errno != ENOENT) {
bb_perror_msg_and_die("can't stat old file");
}
}
- else if (statbuf.st_mtime <= file_header->mtime) {
+ else if (existing_sb.st_mtime >= file_header->mtime) {
if (!(archive_handle->ah_flags & ARCHIVE_EXTRACT_QUIET)) {
bb_error_msg("%s not created: newer or "
"same age file exists", file_header->name);
--
1.6.3.3
More information about the busybox-cvs
mailing list