Skip to content

Fix buggy get/remove file extension#65

Draft
slipher wants to merge 1 commit into
masterfrom
slipher/fileext
Draft

Fix buggy get/remove file extension#65
slipher wants to merge 1 commit into
masterfrom
slipher/fileext

Conversation

@slipher

@slipher slipher commented Jul 8, 2024

Copy link
Copy Markdown
Member

Just noticed this in passing. Haven't tested

- Wrong for Windows paths with both / and \
- Wrong if there is no path separator and no dot
illwieckz
illwieckz previously approved these changes Jul 8, 2024

@illwieckz illwieckz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@illwieckz

Copy link
Copy Markdown
Member

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

@slipher

slipher commented Jul 9, 2024

Copy link
Copy Markdown
Member Author

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.

@slipher slipher marked this pull request as draft July 9, 2024 01:09
@illwieckz illwieckz dismissed their stale review July 15, 2024 23:24

It was converted to draft since.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants