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

fs/extension handles paths with dot incorrectly #81

Closed
Tracked by #1210
dbohdan opened this issue Dec 6, 2022 · 3 comments
Closed
Tracked by #1210

fs/extension handles paths with dot incorrectly #81

dbohdan opened this issue Dec 6, 2022 · 3 comments

Comments

@dbohdan
Copy link

dbohdan commented Dec 6, 2022

> bb -e '(fs/extension "/foo/example.com/data")'
"com/data"
> bb --version
babashka v1.0.167
@dbohdan
Copy link
Author

dbohdan commented Dec 8, 2022

The current fix is IMO wrong. It changes split-ext from a pure function that operates on abstract paths to one whose result depends on the state of your filesystem, which is undesirable. It doesn't help you with remote or abstract paths. Instead, it would be better if it just made sure the last . in the path was after the last /.

@borkdude
Copy link
Contributor

borkdude commented Dec 8, 2022

@dbohdan I agree with that, I misunderstood the original issue

@borkdude borkdude reopened this Dec 8, 2022
borkdude added a commit that referenced this issue Dec 8, 2022
borkdude added a commit that referenced this issue Dec 8, 2022
@borkdude
Copy link
Contributor

borkdude commented Dec 8, 2022

Done

@borkdude borkdude closed this as completed Dec 8, 2022
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

No branches or pull requests

2 participants