Tuesday, December 10, 2019

#1 2019-12-01 05:29:28 am

Nigel Garvey
Moderator
From:: Warwickshire, England
Registered: 2002-11-20
Posts: 5118

Name extension bug

I've just noticed on my Mojave machine that if a file name has a space in its extension (eg. "My script.scpt alias"), the Finder, System Events, NSURL, and NSString all return the relevant 'name extension' or 'pathExtension()' as an empty string (""). No problem with the full 'name' or 'lastPathComponent()'.

The same's true with the Finder on my El Capitan system, but there System Events and the Foundation methods all correctly return the extension as "scpt alias".


NG

Offline

 

#2 2019-12-01 05:58:33 am

Shane Stanley
Member
From:: Australia
Registered: 2002-12-07
Posts: 6065

Re: Name extension bug

Catalina returns "". I see that Xcode doesn't let you include a space in an extension, at least in its interface — it inserts a comma, so you end up with two extensions for the type. I'm not sure what happens if you then edit the Info.plist file directly.


Shane Stanley <sstanley@myriad-com.com.au>
www.macosxautomation.com/applescript/apps/
latenightsw.com

Offline

 

Board footer

Powered by FluxBB

RSS (new topics) RSS (active topics)