Re: [PATCH] import-tars: be nice to wrong directory modes
- From
Randal L. Schwartz <merlyn@stonehenge.com>
- Date
- Apr 29, 2007, 01:36 UTC
- Message-ID
- <86tzv07yhq.fsf@blue.stonehenge.com>
- In-Reply-To
- <Pine.LNX.4.64.0704290159230.29859@racer.site>
>>>>> "Johannes" == Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
Johannes> + next if $name =~ '/$';
This is misleading. That's a regex there. And it also falsely matches a string ending in "/\n", but I bet there are parts of git that break on those filenames too. :)
Consider:
next if $name =~ m{/\z};which matches precisely when the filename ends in /.
-- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 <merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/> Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!