summaryrefslogtreecommitdiff
path: root/archival/libunarchive/data_extract_all.c
diff options
context:
space:
mode:
authorDenys Vlasenko2009-11-29 19:40:36 +0100
committerDenys Vlasenko2009-11-29 19:40:36 +0100
commitdcbfaba264df2f9f07e53f77e8178f5bfc7ae88e (patch)
treeb5dfaa3715ded4f3c9a676b6cf636ad50bf04c9d /archival/libunarchive/data_extract_all.c
parentbf22475e9552b08feb31d40250ab293d2fd98234 (diff)
downloadbusybox-dcbfaba264df2f9f07e53f77e8178f5bfc7ae88e.zip
busybox-dcbfaba264df2f9f07e53f77e8178f5bfc7ae88e.tar.gz
fix improper utimes usage
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'archival/libunarchive/data_extract_all.c')
-rw-r--r--archival/libunarchive/data_extract_all.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/archival/libunarchive/data_extract_all.c b/archival/libunarchive/data_extract_all.c
index 1100410..ae242df 100644
--- a/archival/libunarchive/data_extract_all.c
+++ b/archival/libunarchive/data_extract_all.c
@@ -148,11 +148,11 @@ void FAST_FUNC data_extract_all(archive_handle_t *archive_handle)
}
/* same for utime */
if (archive_handle->ah_flags & ARCHIVE_RESTORE_DATE) {
- struct timeval t;
+ struct timeval t[2];
- t.tv_sec = file_header->mtime;
- t.tv_usec = 0;
- utimes(file_header->name, &t);
+ t[1].tv_sec = t[0].tv_sec = file_header->mtime;
+ t[1].tv_usec = t[0].tv_usec = 0;
+ utimes(file_header->name, t);
}
}
}