Skip errors from being unable to set modification and creation times. If
one of the directories in the filesystem hierarchy is a FAT mountpoint, settings its times will fail, which would cause installation to abort. Instead, make this a best-effort thing. Handling this error is a hack and a better internal scheme for handling this should be added to libarchive.
This commit is contained in:
parent
ad5b0f5b51
commit
a5837f2c26
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=327486
@ -310,7 +310,15 @@ extract_files(struct dpv_file_node *file, int out __unused)
|
|||||||
archive = NULL;
|
archive = NULL;
|
||||||
file->status = DPV_STATUS_DONE;
|
file->status = DPV_STATUS_DONE;
|
||||||
return (100);
|
return (100);
|
||||||
} else if (retval != ARCHIVE_OK) {
|
} else if (retval != ARCHIVE_OK &&
|
||||||
|
!(retval == ARCHIVE_WARN &&
|
||||||
|
strcmp(archive_error_string(archive), "Can't restore time") == 0)) {
|
||||||
|
/*
|
||||||
|
* Print any warning/error messages except inability to set
|
||||||
|
* ctime/mtime, which is not fatal, or even interesting,
|
||||||
|
* for our purposes. Would be nice if this were a libarchive
|
||||||
|
* option.
|
||||||
|
*/
|
||||||
snprintf(errormsg, sizeof(errormsg),
|
snprintf(errormsg, sizeof(errormsg),
|
||||||
"Error while extracting %s: %s\n", file->name,
|
"Error while extracting %s: %s\n", file->name,
|
||||||
archive_error_string(archive));
|
archive_error_string(archive));
|
||||||
|
Loading…
Reference in New Issue
Block a user