Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix buggy get/remove file extension #65

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Conversation

slipher
Copy link
Member

@slipher slipher commented Jul 8, 2024

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
Copy link
Member

@illwieckz illwieckz left a comment

Choose a reason for hiding this comment

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

LGTM.

@illwieckz
Copy link
Member

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

@slipher
Copy link
Member Author

slipher commented Jul 9, 2024

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