• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: slash path to alias
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: slash path to alias


  • Subject: Re: slash path to alias
  • From: Luther Fuller <email@hidden>
  • Date: Tue, 29 Jul 2008 12:56:30 -0500

Second attempt to send (?)

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
  • Follow-Ups:
    • Re: slash path to alias
      • From: Axel Luttgens <email@hidden>
  • Prev by Date: Re: slash path to alias
  • Next by Date: Who is zimbra?
  • Previous by thread: Re: slash path to alias
  • Next by thread: Re: slash path to alias
  • Index(es):
    • Date
    • Thread