[glib/glib-2-20] Fix translation from GIO's file attr to xattr attributes



commit d71e37892c90f19d086068656c314914ace3bc4f
Author: Johan Bilien <jobi litl com>
Date:   Wed Apr 22 19:09:34 2009 +0100

    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.
---
 gio/glocalfileinfo.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/gio/glocalfileinfo.c b/gio/glocalfileinfo.c
index b78b816..e0d5b90 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);



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