]> Dogcows Code - chaz/tar/commitdiff
Allow escaped delimiter in transform replace expr. ccm-transform-delimiter-replace-expr-bugfix
authorCharles McGarvey <chazmcgarvey@brokenzipper.com>
Tue, 11 Aug 2015 23:14:31 +0000 (17:14 -0600)
committerCharles McGarvey <chazmcgarvey@brokenzipper.com>
Wed, 12 Aug 2015 15:40:22 +0000 (09:40 -0600)
src/transform.c

index cd9e27ccf4f6fe624d9f401a58ffd4304bc9794b..5deea759873c326c557dbbf6ab84ac20109b4fb5 100644 (file)
@@ -378,13 +378,19 @@ parse_transform_expr (const char *expr)
              break;
 
            default:
-             /* Try to be nice */
-             {
-               char buf[2];
-               buf[0] = '\\';
-               buf[1] = *cur;
-               add_literal_segment (tf, buf, buf + 2);
-             }
+             if (*cur == delim)
+               {
+                 add_char_segment (tf, delim);
+                 cur++;
+               }
+             else
+               {
+                 /* Try to be nice */
+                 char buf[2];
+                 buf[0] = '\\';
+                 buf[1] = *cur;
+                 add_literal_segment (tf, buf, buf + 2);
+               }
              cur++;
              break;
            }
This page took 0.023639 seconds and 4 git commands to generate.