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 #35 ; simplify code a bit #37

Merged
merged 1 commit into from
Jan 17, 2020
Merged

Conversation

timotheecour
Copy link
Collaborator

@timotheecour timotheecour commented Jan 17, 2020

I've simplified code a bit by adding this:

 when pattern is string:
    let pattern = pattern.glob

so that the remaining code only has to deal with Glob, not string; my understanding is this should have no performance impact in the sense I doubt the code would be more efficient when using a simple string pattern as opposed to a Glob object (eg because file operations should be more expensive anyways); but let me know if you disagree

@haltcase haltcase merged commit 4171cfa into haltcase:master Jan 17, 2020
@haltcase
Copy link
Owner

I like the simplification, and I agree - I doubt there's a significant change in performance. We'd have to benchmark anyway.

Thanks!

@timotheecour timotheecour deleted the pr_fix_35 branch January 17, 2020 23:28
timotheecour added a commit to timotheecour/glob that referenced this pull request Jan 18, 2020
haltcase pushed a commit that referenced this pull request Jan 18, 2020
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.

[critical] walkGlob doesn't work with un-normalized paths (eg containing //); os.walkFiles works
2 participants