[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-tar] exclude wildcards with backslash
From: |
Eric Blake |
Subject: |
Re: [Bug-tar] exclude wildcards with backslash |
Date: |
Thu, 06 May 2010 14:29:23 -0600 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.9) Gecko/20100330 Fedora/3.0.4-1.fc12 Lightning/1.0b1 Mnenhy/0.8.2 Thunderbird/3.0.4 |
On 05/06/2010 02:24 PM, Sergey Poznyakoff wrote:
> Jean-Louis Martineau <address@hidden> ha escrit:
>
>> $ tar xf file.tar --wildcards --exclude 't\*s'
>> It worked for all tar version up to 1.22
>> With tar-1.23, it extract everything except the file 't\*s.
>
> There was a bug in the `exclude' module. I have installed the
> attached patch.
> + do
> + {
> + if (inset)
> + {
> + if (*q == ']')
> + inset = 0;
> + }
> + else if (*q == '[')
> + inset = 1;
> + else if (*q == '\\')
> + q++;
> + }
> + while ((*str++ = *q++));
This doesn't handle: []\a] as the set that recognizes '\\', 'a', or ']'.
Should it?
--
Eric Blake address@hidden +1-801-349-2682
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature