[squeak-dev] (FSPath / 'foo.bar.zot') extension = 'bar.zot'
Thiede, Christoph
Christoph.Thiede at student.hpi.uni-potsdam.de
Thu Nov 5 18:41:14 UTC 2020
Good catch! That's clearly a bug IMO. #extension should use #copyAfterLast: rather than #copyAfter:.
On the other, FSReferenceTest >> #testBaseAndExtension explicitly defines a test where it says:
"Note that the extension of a complex extension starts from the first period up until the end"
<http://www.hpi.de/>
So why is Squeak-FileSystem neglecting the common standards in this case?
Best,
Christoph
________________________________
Von: Squeak-dev <squeak-dev-bounces at lists.squeakfoundation.org> im Auftrag von Tony Garnock-Jones <tonyg at leastfixedpoint.com>
Gesendet: Donnerstag, 5. November 2020 19:31:44
An: The general-purpose Squeak developers list
Betreff: [squeak-dev] (FSPath / 'foo.bar.zot') extension = 'bar.zot'
Hi all,
Currently:
(FSPath / 'foo.bar.zot') extension = 'bar.zot'
Should it be? I expected it to equal 'zot'.
For reference, in python3:
os.path.splitext('foo.bar.zot') == ('foo.bar', '.zot')
and in racket
(equal? (path-get-extension "foo.bar.zot") #".zot")
Tony
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20201105/3ccf2bb2/attachment-0001.html>
More information about the Squeak-dev
mailing list
|