Re: flatten rewritten in perl (first hack)
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.)
Jens
--
Jens.Ritter@weh.rwth-aachen.de grimaldi@debian.org
KeyID: 2048/E451C639 1998/01/28
Print: 5F 3D 43 1E 24 1E CC 48 1E 05 93 3A A7 10 73 37
The Unix way of drinking tea:
cat /dev/boiler/water | tea | sieve > /cup
mount -t hdev /dev/human/mouth01 /mouth ; cat /cup >/mouth/gulp
Reply to: