mirror of
https://github.com/sheumann/hush.git
synced 2025-01-14 12:30:40 +00:00
make tar restore mode again
This commit is contained in:
parent
9a1c71a0f2
commit
e54b472ffc
@ -110,6 +110,14 @@ void data_extract_all(archive_handle_t *archive_handle)
|
|||||||
if (!(archive_handle->flags & ARCHIVE_NOPRESERVE_OWN)) {
|
if (!(archive_handle->flags & ARCHIVE_NOPRESERVE_OWN)) {
|
||||||
lchown(file_header->name, file_header->uid, file_header->gid);
|
lchown(file_header->name, file_header->uid, file_header->gid);
|
||||||
}
|
}
|
||||||
|
/* uclibc has no lchmod, glibc is even stranger -
|
||||||
|
* it has lchmod which seems to do nothing!
|
||||||
|
* so we use chmod... */
|
||||||
|
if (!(archive_handle->flags & ARCHIVE_NOPRESERVE_PERM)
|
||||||
|
&& (file_header->mode & S_IFMT) != S_IFLNK
|
||||||
|
) {
|
||||||
|
chmod(file_header->name, file_header->mode);
|
||||||
|
}
|
||||||
|
|
||||||
if (archive_handle->flags & ARCHIVE_PRESERVE_DATE) {
|
if (archive_handle->flags & ARCHIVE_PRESERVE_DATE) {
|
||||||
struct utimbuf t;
|
struct utimbuf t;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user