commercialhaskell / path

Typed filepath
Other
120 stars 45 forks source link

addExtension fails for double extension like ".triples.gzip" #156

Open andrewufrank opened 4 years ago

andrewufrank commented 4 years ago

For files with a "doubled extension", typically names like "xx.triples.gzip" the addExtension fails. I assume that the double extension is not considered a valid extension. It seems that they are common. Should they be valid for the Path package?

NorfairKing commented 4 years ago

It looks like you can use addExtension twice. Nevertheless, I consider this a bit of a mistake because of extensions like .tar.gz.

andrewufrank commented 4 years ago

I used the conversion to filepath and back. Not elegant, using the addExtension twice is a bit better, but not really much. I wonder why there is no Extension type (with a constructor), which could then accept .tar.gz?