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

FilePath.get_extension behaviour for files with leading dots is counter-intuitive #55

Open
dmbaturin opened this issue Aug 11, 2022 · 0 comments

Comments

@dmbaturin
Copy link
Contributor

If a file name starts with a dot and doesn't have any more dots, FilePath.get_extension considers it a file with an empty name but with an extension.

utop # FilePath.get_extension ".bashrc" ;;
- : string = "bashrc"

I believe when asked, most people will say that a file like .bashrc is a file with no extension, and that a leading dot is a part of the file name. .bashrc.gz is a file named .bashrc with extension gz.

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

1 participant