I am attaching a proposed test based on Tony's example.
+1! Are there any objections or shall we integrate this change into Squeak-FileSystem?
Best, Christoph
________________________________ Von: Squeak-dev squeak-dev-bounces@lists.squeakfoundation.org im Auftrag von Jakob Reschke forums.jakob@resfarm.de Gesendet: Freitag, 6. November 2020 12:31:03 An: The general-purpose Squeak developers list Betreff: Re: [squeak-dev] (FSPath / 'foo.bar.zot') extension = 'bar.zot'
Am Do., 5. Nov. 2020 um 19:41 Uhr schrieb Thiede, Christoph Christoph.Thiede@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:
extension "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".