]> wimlib.net Git - wimlib/blobdiff - src/extract.c
Capture and apply extended attributes on Windows
[wimlib] / src / extract.c
index b59e22352f81f6078e8fc224a4df322817b12628..cd1dd2c1ca0ebb319066db5c02c5fcacff3ba84b 100644 (file)
@@ -6,7 +6,7 @@
  */
 
 /*
- * Copyright (C) 2012-2016 Eric Biggers
+ * Copyright (C) 2012-2018 Eric Biggers
  *
  * This file is free software; you can redistribute it and/or modify it under
  * the terms of the GNU Lesser General Public License as published by the Free
@@ -1225,8 +1225,8 @@ inode_tally_features(const struct wim_inode *inode,
                features->unix_data++;
        if (inode_has_object_id(inode))
                features->object_ids++;
-       if (inode_has_linux_xattrs(inode))
-               features->linux_xattrs++;
+       if (inode_has_xattrs(inode))
+               features->xattrs++;
 }
 
 /* Tally features necessary to extract a dentry and the corresponding inode.  */
@@ -1365,27 +1365,31 @@ do_feature_check(const struct wim_features *required_features,
                        required_features->security_descriptors);
 
        /* Standard UNIX metadata */
-       if ((extract_flags & WIMLIB_EXTRACT_FLAG_UNIX_DATA) &&
-           required_features->unix_data && !supported_features->unix_data)
-       {
-               ERROR("Requested UNIX metadata extraction, but extraction "
-                     "backend does not support it!");
-               return WIMLIB_ERR_UNSUPPORTED;
-       }
        if (required_features->unix_data &&
-           !(extract_flags & WIMLIB_EXTRACT_FLAG_UNIX_DATA))
+           (!supported_features->unix_data ||
+            !(extract_flags & WIMLIB_EXTRACT_FLAG_UNIX_DATA)))
        {
-               WARNING("Ignoring UNIX metadata (uid/gid/mode/rdev) of %lu files",
-                       required_features->unix_data);
+               if (extract_flags & WIMLIB_EXTRACT_FLAG_UNIX_DATA) {
+                       ERROR("Requested UNIX metadata extraction, but "
+                             "extraction backend does not support it!");
+                       return WIMLIB_ERR_UNSUPPORTED;
+               }
+               WARNING("Ignoring UNIX metadata (uid/gid/mode/rdev) of %lu files%"TS,
+                       required_features->unix_data,
+                       (supported_features->unix_data ?
+                        T("\n          (use --unix-data mode to extract these)") : T("")));
        }
 
-       /* Linux-style extended attributes */
-       if (required_features->linux_xattrs &&
-           (!supported_features->linux_xattrs ||
-            !(extract_flags & WIMLIB_EXTRACT_FLAG_UNIX_DATA)))
+       /* Extended attributes */
+       if (required_features->xattrs &&
+           (!supported_features->xattrs ||
+            (supported_features->unix_data &&
+             !(extract_flags & WIMLIB_EXTRACT_FLAG_UNIX_DATA))))
        {
-               WARNING("Ignoring Linux-style extended attributes of %lu files",
-                       required_features->linux_xattrs);
+               WARNING("Ignoring extended attributes of %lu files%"TS,
+                       required_features->xattrs,
+                       (supported_features->xattrs ?
+                        T("\n          (use --unix-data mode to extract these)") : T("")));
        }
 
        /* Object IDs.  */