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

Re: [MacPerl] recursive dir script



At 13:16 96-03-20, Joel Feinstein wrote:

>I thought I'd try the standard "recursive dir" script on a mac.
>At first it worked fine, but when I tried it on
>my brother's quadra I started getting very unpleasant crashes, which turned
>out to be caused by deep recursion.
>
>I have a fix, and my script now works, but perhaps
>someone has
>a "safer" version of this script?

As I recall, there is a problem when file names become greater than 256
characters (at least there was in older version 4s).  The solution that
works on both (all?) platforms is to change the working directory as
needed to keep short relative path names.

As a side benefit, using chdir() and always using leaf file names
should run considerably faster than full path names on a Mac.  (This is
due to the internals of the Mac's file system.)

--Hal
Hal Wine <hal@dtor.com>     voice: 510/482-0597