Re: mac to unix path names
Re: mac to unix path names
- Subject: Re: mac to unix path names
- From: Reinhold Penner <email@hidden>
- Date: Fri, 2 May 2003 20:09:35 -1000
Bill,
On Friday, May 2, 2003, at 18:54 Pacific/Honolulu, bill wrote:
>
"/" as POSIX file as alias
Yes, that works fine. Please can anyone just try this:
set prefsFolder to ((path to preferences from user domain) as Unicode
text)
set x to alias prefsFolder
--> File alias disc trhs dur:Users:alaweo:Library:Preferences: wasn't
found.
Well, I can see it. It is there and the file path contains the
<egrave>, which this stupid list server mangles (c'mon Apple, this is
absolutely ridiculous behavior for a list that is supposed to deal with
AS). So now I change the disk name to "disc tres dur" (i.e. without the
<egrave>) and it just works:
set prefsFolder to ((path to preferences from user domain) as Unicode
text)
set x to alias prefsFolder
-->alias "disc tres dur:Users:alaweo:Library:Preferences:"
So now let's see what the quoted form of POSIX path does. I created a
file called "disk tr<egrave>s dur.rtf" on the desktop. So now the
following works fine:
set dskTop to ((path to desktop folder) as Unicode text)
--> "HD1:Users:alaweo:Desktop:"
set x to quoted form of POSIX path of (dskTop & "disc trhs dur.rtf")
--> "'/Users/alaweo/Desktop/disc trhs dur.rtf'"
do shell script "open " & x
--> the file opens
So far so good. Now let's also change the disk name to "disc
tr<egrave>s dur" and access a file I called "test.rtf"
set dskTop to ((path to desktop folder) as Unicode text)
--> "disc trhs dur:Users:alaweo:Desktop:" --fine
set x to quoted form of POSIX path of (dskTop & "test.rtf")
--> "'/disc trhs dur/Users/alaweo/Desktop/test.rtf'" -still fine
do shell script "open " & x
--> 2003-05-02 20:05:13.381 open[858] No such file: /disc tr\\350s
dur/Users/alaweo/Desktop/test.rtf
This has got to be a bug.
-Reinhold
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.