DaemonEngine / crunch

Advanced DXTc texture compression and transcoding library and tool, upgraded with Unity improvements, added features, extended system and hardware support, deeply tested.
https://github.com/DaemonEngine/crunch
Other
16 stars 6 forks source link

Fix buggy get/remove file extension #65

Open slipher opened 4 months ago

slipher commented 4 months ago

Just noticed this in passing. Haven't tested

illwieckz commented 4 months ago

It doens't break the tests in the CI so there should not be obvious regressions.

slipher commented 4 months ago

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.