Author: colossus
Date: 2006-08-01 08:46:39 +0000 (Tue, 01 Aug 2006)
New Revision: 22601

Modified:
   xarchiver/trunk/src/callbacks.c
Log:
Fixed the missed extraction when the filename contains [ or ].


Modified: xarchiver/trunk/src/callbacks.c
===================================================================
--- xarchiver/trunk/src/callbacks.c     2006-08-01 07:28:17 UTC (rev 22600)
+++ xarchiver/trunk/src/callbacks.c     2006-08-01 08:46:39 UTC (rev 22601)
@@ -1452,11 +1452,17 @@
 
        while (*p != '\000')
        {
-               if (is_escaped_char(*p)) escapechars++;
+               if (is_escaped_char(*p))
+                       {
+                               escapechars++;
+                               if (*p == '[' || *p == ']')
+                                       escapechars++;
+                       }
                p++;
     }
 
-       if (!escapechars) return g_strdup(string);
+       if (!escapechars)
+               return g_strdup(string);
        escaped = (char *) g_malloc (strlen(string) + escapechars + 1);
 
        p = string;
@@ -1464,7 +1470,12 @@
 
        while (*p != '\000')
        {
-        if (is_escaped_char(*p)) *q++ = '\\';
+        if (is_escaped_char(*p))
+               {
+                       if (*p == '[' || *p == ']')
+                               *q++ = '\\';
+                       *q++ = '\\';
+               }
                *q++ = *p++;
        }
        *q = '\000';

_______________________________________________
Xfce4-commits mailing list
[email protected]
http://foo-projects.org/mailman/listinfo/xfce4-commits

Reply via email to