summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2010-09-14 17:11:06 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2010-09-14 17:11:06 (GMT)
commit5233d34c31643778645be8df98061a5dbd68c660 (patch)
tree8d4c9b778bb5933e529f6f6f6cc24121308fa366 /Source
parent913437da726102c60b950115add990c5d9902c9d (diff)
parent666f328858e5c47a0b2286af95cbc127f28a663b (diff)
downloadCMake-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.cxx12
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