fix improper utimes usage

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko
2009-11-29 19:40:36 +01:00
parent bf22475e95
commit dcbfaba264
4 changed files with 18 additions and 18 deletions

View File

@@ -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);
}
}
}