Re: slash path to alias
Re: slash path to alias
- Subject: Re: slash path to alias
- From: Luther Fuller <email@hidden>
- Date: Tue, 29 Jul 2008 12:34:30 -0500
Axel Luttgens commented:
Let's then suppose the HFS path of the account directory contains a
slash, as viewed in the Finder on an HFS volume; even if very
unlikely, it is possible to face such a case.
It could happen. At one time, I had lots of files in OS X with slashes
inherited from OS 9. More or less following Axel's suggestion, I tried
this code in both Leopard and Tiger.
try
set acnt to (get account of mbox) -- FAILS HERE IF THERE IS NO ACCOUNT
set acntDir to (account directory of acnt)
if (class of acntDir) = «class furl» then
set acntDir to acntDir as text
else
set acntDir to (POSIX file acntDir) as text
if (last character of acntDir) ≠ ":" then set acntDir to (acntDir
& ":") --?????
end if
on error
set acntDir to (path to library folder from user domain) as text
end try
-- Followed by more code which constructs a complete path to a
-- message, then returns an alias to it.
In either case, in both OSs, I get the proper colon delimited and
terminated string, without testing the last character. I'm wondering
if the colon terminal test is even necessary. I am limited in messages
I can test on the iBook, since it's not actively used for email and I
have no dotMac messages available. I did see some funny behavior with
'(POSIX file acntDir)', but that was with madeup strings.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden