]> git.ipfire.org Git - thirdparty/snapper.git/commitdiff
- make the xattributes comparison independent
authorOndrej Kozina <okozina@redhat.com>
Tue, 12 Mar 2013 14:14:58 +0000 (15:14 +0100)
committerOndrej Kozina <okozina@redhat.com>
Tue, 12 Mar 2013 14:14:58 +0000 (15:14 +0100)
  on File's status

We will compare xattributes each time without respect to
previous File's status. With certain exteded attributes
this will make the 'XAs have been modified' msg more
frequent as there're generaly different XAs for directories
and regular files (i.e.: SELinux, ACL). But this aproach
is closer to others attibutes concept at all.

snapper/Compare.cc

index 3c7df3a3268a0079869016badc8a3c36459e566c..e19bb7c0d467f695f441826f2a29aecf010bbaf3 100644 (file)
@@ -204,20 +204,6 @@ namespace snapper
        {
            if (!cmpFilesContent(file1, stat1, file2, stat2))
                status |= CONTENT;
-
-#ifdef ENABLE_XATTRS
-            /* NOTE: think about this. Do you want to report
-             * XA modification in case the compared files differ
-             * in their types?
-             */
-            if (file1.xaSupported() && file2.xaSupported())
-            {
-                if (!cmpFilesXattrs(file1, stat1, file2, stat2))
-                {
-                    status |= XATTRS;
-                }
-            }
-#endif
        }
 
        if ((stat1.st_mode ^ stat2.st_mode) & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID |
@@ -236,6 +222,16 @@ namespace snapper
            status |= GROUP;
        }
 
+#ifdef ENABLE_XATTRS
+            if (file1.xaSupported() && file2.xaSupported())
+            {
+                if (!cmpFilesXattrs(file1, stat1, file2, stat2))
+                {
+                    status |= XATTRS;
+                }
+            }
+#endif
+
        return status;
     }