Menu

#85 file.copy doesn't copy bundles/packages properly

v10.0 Mac OS X
open
5
2006-05-26
2006-05-26
No

The file.copy verb doesn't copy bundles/packages
properly. This is most apparent when trying to copy a
Mac OS X application that is a bundle. It appears to
copy them but when you try to launch them, they don't
launch.

I've been looking into the problem and it's a bit
tricky in that there are several levels of problems to
address.

Locally I've updated the Mac kernel copy code to use
the FSCopyObject sample code from Apple.

I updated the fileisfolder code to treat a
bundle/package not as a folder but as a file. This
seemed like the best short term solution to the whole
new concept of bundles/packages which Frontier wasn't'
designed to deal with. It could be that we could treat
them as folders once again if the getfileinfo routines
are updated to get info they are currently missing.

I then needed to update the kernel code behind
file.creator and file.type since file.isFolder was no
longer returning true which we were using to work
around the kernel problem with these verbs. I altered
the kernel code to use Launch Services to grab the
creator and type on Mac. This seems to work well as
the verbs fall back to calling the kernel if the
scripts can't get the creator or type.

I'm going to burn this in for a bit and then I'm going
to crank 'em up to the repository and let others help
me test the changes out.

Comments?

Discussion


Log in to post a comment.