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

Re: [MacPerl] detecting corrupt resources



>Does anyone know how to prevent MacPerl from crashing when it opens the
>resource fork of a corrupt file?

The MacOS allows OpenRF() and OpenResFile(). The first simply opens the
resource fork for reading without benefit of the resource manager. The
second expects to find a resource map which probably has to be clean.

I'm betting that OpenRF is supported somewhere in MacPerl, but then you'd
have to scan the resource map manually.  Probably a pain. You could look for
obvious things like size though. The only common use of OpenRF is for
copying or compressing files.

***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch