Re: symlinks
Re: symlinks
- Subject: Re: symlinks
- From: "Mark J. Reed" <email@hidden>
- Date: Tue, 17 Aug 2010 16:43:42 -0400
We're talking about actions trying to operate on folders that don't
exist. It is not surprising when that doesn't work. I'm confused
about what you expect to happen here.
What I said before is true: symbolic links can exist without their
target; the mere attempt to create such a link, or to read where it
points, causes no problems until you try to actually access the
pointed-to file. But just about every operation you can think of,
when applied to the link, is *going* to try to access that
pointed-to-file. So if it doesn't exist, those operations will fail,
and things will break. You can't ask for the owner of a nonexistent
file, or the last modification time, or the size, or . . .
I don't know what (path to blah from user domain) is doing behind the
scenes; it's mildly surprising that what should be a simple path
lookup operation fails, but only mildly. It's not at all surprising
that the "as alias" fails.
On Tue, Aug 17, 2010 at 3:41 PM, Luther Fuller <email@hidden> wrote:
> I created a symlink file in my test user's Library folder which points to a
> relocated Application Support folder on an image disk. Tried the following
> script:
> try
> (path to application support from user domain)
> -- If the disk "Relocated" is not mounted, then error -48 Duplicate file
> name. «class asup»
> (the result as text) & "AddressBook:Images:"
> alias the result
> -- If the file/folder does not exist, then error -43 File alias
> Relocated:Application Support:AddressBook:garbage: wasn’t found.
> on error errText number errNr
> log "Error = " & errNr & return & errText
> return
> end try
> tell application "Finder" to open the result
> It works properly ... but notice that 'path to ...' will break if the disk
> is not mounted.
> (In my application script that originated this problem, the 'path to ...'
> was not inside the try block, but the error was generated by the 'alias ...'
> line.)
> The problem is caused by Portable Mail, which I have never used, but is used
> by a user of my application.
> Portable Mail also uses 'ln -s ...' to create the symlink. If anyone has
> used Portable Mail, perhaps we could discuss this.
> As far as I can determine from my tests, my application should find the
> relocated /Mail/Mailboxes/ folder and function normally.
>
> _______________________________________________
> 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
>
--
Mark J. Reed <email@hidden>
_______________________________________________
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