mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Portability enhancement: MS Windows won't restore metadata if the file
is still open, so close the file as soon as we've written the file contents, before we attempt to restore metadata. Thanks to: Kees Zeelenberg
This commit is contained in:
parent
6c7c20ce28
commit
48a54ddbd0
1 changed files with 1 additions and 1 deletions
|
|
@ -482,9 +482,9 @@ extract_file(struct archive *a, struct archive_entry *entry, int flags)
|
|||
return (ARCHIVE_WARN);
|
||||
}
|
||||
r = archive_read_data_into_fd(a, fd);
|
||||
close(fd);
|
||||
extract->pst = NULL; /* Cached stat data no longer valid. */
|
||||
r2 = restore_metadata(a, entry, flags);
|
||||
close(fd);
|
||||
return (err_combine(r, r2));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue