Re: File Vault Issue
Re: File Vault Issue
- Subject: Re: File Vault Issue
- From: HOnza Koudelka <email@hidden>
- Date: Wed, 23 Mar 2005 08:21:54 +0100
Thanks Tom! Your message did not get to the list, so I am including
it here, and adding a short comment below...
At 15:02 +1200 3/23/05, Tom Robinson wrote:
I sent a workaround to Mark (who had also documented it) and this list:
My own test was this AppleScript:
property Logs : alias ((path to library folder from user domain as
text) & "Logs:")
tell application "Finder"
open Logs
set theComment to comment of Logs
set labelIndex to label index of Logs
end tell
With my FileVault protected home folder this script will fail on the
'comment' line (and also the 'label index' line) with 'Finder got an
error: Can't get comment of alias "tom:Library:Logs:"'
The workaround:
I created an empty 2 Meg disk image and named the image tom--the
same name as my home folder. With this disc image mounted the above
script works.
The script also works with a network volume mounted with the same
name, which is how I found it.
From your finding, it seems that this is how AppleScritp works and
how the workaround works:
How AppleScript works with FileVault:
FileVault causes current user's home folder to be mounted as a volume,
so getting path to any file within it as string results in a path like
this: "username:pathrelativetohome". However, the volume is "invisibly"
mounted behind the scenes, so it does not appear on the desktop and
cannot be accessed by Finder.
How the workardoung seems to work:
Mounting another volume with the same name causes Finder to come across
its preliminary checks when handling an event, so it does not generate
an error. When actually executing the requested command and resolving
the string path, the correct volume is being used because it was mounted
first, before the fake one.
Other effects:
Apparently, if you mount multiple volumes with the same name, you can
only access the first one via string paths from within AppleScript.
Anyway, this behavior of AppleScript when FileVault is active is an
evident bug, and I am hoping that Apple fixes it in a near future.
For scripters, this means that we cannot rely on this behavior as it
will most probably change in future versions of Mac OS X/AppleScript.
--
HOnza Koudelka
Production and Quality Manager, 24U Software
Associate Member, FileMaker Solutions Alliance
mailto:email@hidden
http://www.24uSoftware.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden