From: Ondrej Kozina Date: Tue, 12 Mar 2013 14:14:58 +0000 (+0100) Subject: - make the xattributes comparison independent X-Git-Tag: v0.1.3~18^2~11 X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=40ccae842b7afa4fa1e8353e2e8aa802cd943166;p=thirdparty%2Fsnapper.git - make the xattributes comparison independent 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. --- diff --git a/snapper/Compare.cc b/snapper/Compare.cc index 3c7df3a3..e19bb7c0 100644 --- a/snapper/Compare.cc +++ b/snapper/Compare.cc @@ -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; }