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
This commit is contained in:
1 parent
c246c4194f
commit
3f9c150b77
1 file changed
+1
-1
@@ -860,7 +860,7 @@ ostree_set_xattrs (GFile *f,
|
|||||||
&name, &value);
|
&name, &value);
|
||||||
value_data = g_variant_get_fixed_array (value, &value_len, 1);
|
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);
|
g_clear_pointer (&value, (GDestroyNotify) g_variant_unref);
|
||||||
if (loop_err)
|
if (loop_err)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in new issue
Block a user