Preserve timestamps on files on tar extract.
Conversion to libarchive changed the behavior of cmake -E tar xzf. This commit fixes that oversight.
This commit is contained in:
parent
2eab3b2cbb
commit
666f328858
|
@ -1931,12 +1931,20 @@ bool extract_tar(const char* outFileName, bool verbose,
|
||||||
}
|
}
|
||||||
if(extract)
|
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);
|
r = archive_write_header(ext, entry);
|
||||||
if (r != ARCHIVE_OK)
|
if (r != ARCHIVE_OK)
|
||||||
{
|
{
|
||||||
cmSystemTools::Error("Problem with archive_write_header(): ",
|
cmSystemTools::Error("Problem with archive_write_header(): ",
|
||||||
archive_error_string(a));
|
archive_error_string(ext));
|
||||||
cmSystemTools::Error("Curren file:",
|
cmSystemTools::Error("Current file:",
|
||||||
archive_entry_pathname(entry));
|
archive_entry_pathname(entry));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue