]> wimlib.net Git - wimlib/blobdiff - src/win32_apply.c
win32_common.c: add extra error messages if pread() or pwrite() fails
[wimlib] / src / win32_apply.c
index 4c2f97d34d41ff3ad5e9bbdb37618e4a4ef01d4d..faacd718b7e9178e0d00610a7bd4aa57ea1b3313 100644 (file)
@@ -267,9 +267,10 @@ win32_get_supported_features(const wchar_t *target,
 
        get_vol_flags(target, &vol_flags, &short_names_supported);
 
-       supported_features->archive_files = 1;
+       supported_features->readonly_files = 1;
        supported_features->hidden_files = 1;
        supported_features->system_files = 1;
+       supported_features->archive_files = 1;
 
        if (vol_flags & FILE_FILE_COMPRESSION)
                supported_features->compressed_files = 1;
@@ -1675,15 +1676,18 @@ retry:
                 * STATUS_ACCESS_DENIED when creating a named data stream that
                 * was just deleted, using a directory-relative open.  I have no
                 * idea why Windows is broken in this case.  */
-               static const SECURITY_DESCRIPTOR_RELATIVE desc = {
-                       .Revision = SECURITY_DESCRIPTOR_REVISION1,
-                       .Control = SE_SELF_RELATIVE | SE_DACL_PRESENT,
-                       .Owner = 0,
-                       .Group = 0,
-                       .Sacl = 0,
-                       .Dacl = 0,
-               };
-               (*func_NtSetSecurityObject)(h, DACL_SECURITY_INFORMATION, (void *)&desc);
+               if (!(ctx->common.extract_flags & WIMLIB_EXTRACT_FLAG_NO_ACLS)) {
+                       static const SECURITY_DESCRIPTOR_RELATIVE desc = {
+                               .Revision = SECURITY_DESCRIPTOR_REVISION1,
+                               .Control = SE_SELF_RELATIVE | SE_DACL_PRESENT,
+                               .Owner = 0,
+                               .Group = 0,
+                               .Sacl = 0,
+                               .Dacl = 0,
+                       };
+                       (*func_NtSetSecurityObject)(h, DACL_SECURITY_INFORMATION,
+                                                   (void *)&desc);
+               }
        }
 
        if (!dentry_is_root(dentry)) {