← Commit list

e54b472ff

Denis Vlasenko
Denis Vlasenko
2007-02-12
FAILED Duration: 11s

Subject

make tar restore mode again

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

archival/libunarchive/data_extract_all.c+8 -0
@@ -110,6 +110,14 @@ void data_extract_all(archive_handle_t *archive_handle)
if (!(archive_handle->flags & ARCHIVE_NOPRESERVE_OWN)) {
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) {
struct utimbuf t;