Fix translation from GIO's file attr to xattr attributes

Bug 579862 – requesting xattr::foo ends up calling getxattr(...,
user.:foo,...)

The patch makes sure we escape xattr::, not xattr:, before adding user.
and calling getxattr.
This commit is contained in:
Johan Bilien 2009-04-22 19:09:34 +01:00
parent a9c33dbd7a
commit 491a036d84

View File

@ -527,7 +527,7 @@ get_xattrs (const char *path,
attr2 = strchr (attr, ':');
if (attr2)
{
attr2++; /* Skip ':' */
attr2 += 2; /* Skip '::' */
unescaped_attribute = hex_unescape_string (attr2, NULL, &free_unescaped_attribute);
if (user)
a = g_strconcat ("user.", unescaped_attribute, NULL);