diff options
author | David Cole <david.cole@kitware.com> | 2010-09-09 16:57:14 (GMT) |
---|---|---|
committer | David Cole <david.cole@kitware.com> | 2010-09-09 16:57:14 (GMT) |
commit | 666f328858e5c47a0b2286af95cbc127f28a663b (patch) | |
tree | 5d69caa7a75190bd986a92342d38ca2251f972ad /Source | |
parent | 2eab3b2cbb3464ae79ce3b39d924f1844b96bd8f (diff) | |
download | CMake-666f328858e5c47a0b2286af95cbc127f28a663b.zip CMake-666f328858e5c47a0b2286af95cbc127f28a663b.tar.gz CMake-666f328858e5c47a0b2286af95cbc127f28a663b.tar.bz2 |
Preserve timestamps on files on tar extract.
Conversion to libarchive changed the behavior of
cmake -E tar xzf. This commit fixes that oversight.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmSystemTools.cxx | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index 8378922..531616d 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -1931,12 +1931,20 @@ bool extract_tar(const char* outFileName, bool verbose, } if(extract) { + r = archive_write_disk_set_options(ext, ARCHIVE_EXTRACT_TIME); + if (r != ARCHIVE_OK) + { + cmSystemTools::Error( + "Problem with archive_write_disk_set_options(): ", + archive_error_string(ext)); + } + r = archive_write_header(ext, entry); if (r != ARCHIVE_OK) { cmSystemTools::Error("Problem with archive_write_header(): ", - archive_error_string(a)); - cmSystemTools::Error("Curren file:", + archive_error_string(ext)); + cmSystemTools::Error("Current file:", archive_entry_pathname(entry)); } else |