tisdagen den 11 februari 2014 11.26.15 skrev du: > On 9 February 2014 22:08, Magnus Holmgren <mag...@kibibyte.se> wrote: > > The first "if" should be a "while", shouldn't it? Otherwise we'll only > > skip > > over the first "../" if file_name starts with "../../", if I'm not > > mistaken. > That's handled by the while loop right after the if. Attached test > case contains an entry called ../../../empty-file > tar tf should print a warning message and list the full path, while > libtar should simply print it as 'empty-file'.
Yes, an odd number of ".." will yield the desired result, but the even ".."s will be missed. We should also strip any leading slashes to be of any use, so I'll add that too. -- Magnus Holmgren holmg...@debian.org Debian Developer
signature.asc
Description: This is a digitally signed message part.