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

Thiede, Christoph Christoph.Thiede at student.hpi.uni-potsdam.de
Sat Nov 7 12:54:15 UTC 2020

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


Von: Squeak-dev <squeak-dev-bounces at lists.squeakfoundation.org> im Auftrag von Jakob Reschke <forums.jakob at 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 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".

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20201107/5e8c9532/attachment.html>

More information about the Squeak-dev mailing list