[ostree] libostree: Also use xattr callback for directories



commit f86a132eb0c0a9ac9212b8471f2e6185a7325f50
Author: Colin Walters <walters verbum org>
Date:   Sat Feb 1 11:30:10 2014 -0500

    libostree: Also use xattr callback for directories
    
    They need labels too, obviously.

 src/libostree/ostree-repo-commit.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/src/libostree/ostree-repo-commit.c b/src/libostree/ostree-repo-commit.c
index e470b8b..10d3971 100644
--- a/src/libostree/ostree-repo-commit.c
+++ b/src/libostree/ostree-repo-commit.c
@@ -1751,7 +1751,12 @@ write_directory_to_mtree_internal (OstreeRepo                  *self,
       if (filter_result == OSTREE_REPO_COMMIT_FILTER_ALLOW)
         {
           g_debug ("Adding: %s", gs_file_get_path_cached (dir));
-          if (!(modifier && (modifier->flags & OSTREE_REPO_COMMIT_MODIFIER_FLAGS_SKIP_XATTRS) > 0))
+          if (modifier && modifier->xattr_callback)
+            {
+              xattrs = modifier->xattr_callback (self, relpath, child_info,
+                                                 modifier->xattr_user_data);
+            }
+          else if (!(modifier && (modifier->flags & OSTREE_REPO_COMMIT_MODIFIER_FLAGS_SKIP_XATTRS) > 0))
             {
               if (!gs_file_get_all_xattrs (dir, &xattrs, cancellable, error))
                 goto out;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]