From 491a036d8480f4d710ef601a27a57b559b0a46d7 Mon Sep 17 00:00:00 2001 From: Johan Bilien Date: Wed, 22 Apr 2009 19:09:34 +0100 Subject: [PATCH] Fix translation from GIO's file attr to xattr attributes MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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. --- gio/glocalfileinfo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gio/glocalfileinfo.c b/gio/glocalfileinfo.c index b78b8168..e0d5b90d 100644 --- a/gio/glocalfileinfo.c +++ b/gio/glocalfileinfo.c @@ -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); -- 2.34.1