diff options
author | Brad King <brad.king@kitware.com> | 2010-09-14 17:11:06 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2010-09-14 17:11:06 (GMT) |
commit | 5233d34c31643778645be8df98061a5dbd68c660 (patch) | |
tree | 8d4c9b778bb5933e529f6f6f6cc24121308fa366 /Source | |
parent | 913437da726102c60b950115add990c5d9902c9d (diff) | |
parent | 666f328858e5c47a0b2286af95cbc127f28a663b (diff) | |
download | CMake-5233d34c31643778645be8df98061a5dbd68c660.zip CMake-5233d34c31643778645be8df98061a5dbd68c660.tar.gz CMake-5233d34c31643778645be8df98061a5dbd68c660.tar.bz2 |
Merge topic 'preserve-timestamps-on-tar-extract'
666f328 Preserve timestamps on files on tar extract.
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 |