• 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: Skeeve <email@hidden>
  • Date: Tue, 29 Jul 2008 12:00:51 +0200

Hi Luther!

Luther Fuller schrieb:
So ...

    POSIX path of acntDir
    if (last character of acntDir) = ":" then
        set acntDir to (POSIX file the result) as text
    else
        set acntDir to ((POSIX file the result) as text) & ":"
    end if

And now it works in both Tiger and Leopard.
I wonder whether or not you can replace those 6 lines by this one line:

set acntDir to (POSIX file ((POSIX path of acntDir) & "/")) as text

It works in Tiger. At least if I set acntDir to any string that is a valid path, whether it has a trailing colon or not. I always get the trailing colon at the end.

It works because (afaik) a POSIX path is allowed to have consecutive slashes which are replaced by one.

-- Skeeve
_______________________________________________
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: Luther Fuller <email@hidden>
References: 
 >slash path to alias (From: Luther Fuller <email@hidden>)
 >Re: slash path to alias (From: "Mark J. Reed" <email@hidden>)
 >Re: slash path to alias (From: Luther Fuller <email@hidden>)

  • Prev by Date: Send commands to remote machine with 'do shell script'
  • Next by Date: Re: Send commands to remote machine with 'do shell script'
  • Previous by thread: Re: slash path to alias
  • Next by thread: Re: slash path to alias
  • Index(es):
    • Date
    • Thread