diff options
author | Stef Walter <stefw@redhat.com> | 2013-08-13 15:41:12 +0200 |
---|---|---|
committer | Stef Walter <stefw@redhat.com> | 2013-08-13 15:42:54 +0200 |
commit | 3f9c150b77c16f709166d0d32c8c08b19be12870 (patch) | |
tree | dc182d823d86898537ee30b59d25a9be3cf850d0 | |
parent | c246c4194f4841d4afa41308e3904e00cefed2e0 (diff) | |
download | ostree-3f9c150b77c16f709166d0d32c8c08b19be12870.tar.gz |
Don't use XATTR_REPLACE with lsetxattr()
If we pass XATTR_REPLACE then the attribute must already exist, which
is not our intent. Passing zero creates the attribute if necessary,
or replaces it when it already exists.
https://bugzilla.gnome.org/show_bug.cgi?id=705893
-rw-r--r-- | src/libostree/ostree-core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libostree/ostree-core.c b/src/libostree/ostree-core.c index 7fb4e2f9..b8f39884 100644 --- a/src/libostree/ostree-core.c +++ b/src/libostree/ostree-core.c @@ -860,7 +860,7 @@ ostree_set_xattrs (GFile *f, &name, &value); value_data = g_variant_get_fixed_array (value, &value_len, 1); - loop_err = lsetxattr (path, (char*)name, (char*)value_data, value_len, XATTR_REPLACE) < 0; + loop_err = lsetxattr (path, (char*)name, (char*)value_data, value_len, 0) < 0; g_clear_pointer (&value, (GDestroyNotify) g_variant_unref); if (loop_err) { |