[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: flatten rewritten in perl (first hack)



On 22 Dec 1998, Jens Ritter wrote:

>Steve McIntyre <stevem@chiark.greenend.org.uk> writes:
>
>> On Tue, 22 Dec 1998, Jens Ritter wrote:
>> 
>> >I rewrote the "flatten" step of the slink_cd-0.93 in perl because it is
>> >one of the most time consuming steps (bad for fast development). It is
>> >included as attachment.
>> 
>> [snip]
>> 
>> >I didn't test, wether there are any differences. I am open to suggestions
>> >how to test that.
>> 
>> Looks good to me, I've included it for v0.94
>
>Well, I just found a bug:
>
>The line reading 
>
>/^(.*\/)(.*)$/;   # regexps are greedy (replaces basename and dirname).
>
>has to be changed to: 
>
>/^(.*)\/(.*)$/;   # regexps are greedy (replaces basename and dirname).
>
>(because dirname and basename do not pass back the "/" in the middle
>between the dir and base. This will cause bad "one off" symlinks.) 

Ah, OK. Fixed.

-- 
Steve McIntyre, CURS CCE, Cambridge, UK.         stevem@chiark.greenend.org.uk
"It's actually quite entertaining to watch ag129 prop his foot up on
 the desk so he can get a better aim."          [ seen in ucam.chat ]
Finger for PGP key


Reply to: