Re: Sierra and URLByDeletingLastPathComponent
Re: Sierra and URLByDeletingLastPathComponent
- Subject: Re: Sierra and URLByDeletingLastPathComponent
- From: Shane Stanley <email@hidden>
- Date: Sat, 24 Sep 2016 18:17:37 +1000
On 24 Sep. 2016, at 6:02 pm, Yvan KOENIG <email@hidden> wrote:
>
>> I guess the question is: why did you need the slash?
>
> I need it to build some full pathnames while driving LibreOffice with GUIScripting but I will look if I may get rid of that.
If you're getting the paths using Cocoa methods, you might as well build them that way too. The thing with methods like stringByAppendingPathComponent: is that it takes care of the slashes for you, adding one if needed. Similarly, lastPathComponent() returns the same result for /blah/blah/ as it does for /blah/blah.
--
Shane Stanley <email@hidden>
<www.macosxautomation.com/applescript/apps/>, <latenightsw.com>
_______________________________________________
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