crunch
crunch copied to clipboard
Fix buggy get/remove file extension
Just noticed this in passing. Haven't tested
It doens't break the tests in the CI so there should not be obvious regressions.
I ran into extension handling brokenness when passing crunch an input filename with no extension. For example if the basename is foo, Crunch replaces it with foo.foo and then can't find the input. But when applying this PR, the situation was still not so great: it looked for foo. (notice the dot). Well at least there is a chance it works on Windows now as any number of dots at the end of a filename are ignored :-) Still, I feel this could use more work to be anything really useful.