[squeak-dev] (FSPath / 'foo.bar.zot') extension = 'bar.zot'

Jakob Reschke forums.jakob at resfarm.de
Fri Nov 6 11:31:03 UTC 2020

Am Do., 5. Nov. 2020 um 19:41 Uhr schrieb Thiede, Christoph
<Christoph.Thiede at student.hpi.uni-potsdam.de>:
> Good catch! That's clearly a bug IMO. #extension should use #copyAfterLast: rather than #copyAfter:.

Pharo has it like this as well, so it is also an unnecessary incompatibility:

    "Return the extension of path basename i.e., /foo/gloops.taz
extension is 'taz'"
    ^ self basename copyAfterLast: self extensionDelimiter

> 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"

The original author might either have just documented that status quo,
or thought of something like .tar.gz. Again Pharo has changed this to
"Note that the extension of a complex extension starts after the last
extension delimiter".

More information about the Squeak-dev mailing list