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

path-has-extension? requires suffix to be strictly shorter than name #2132

Closed
mbutterick opened this issue Jun 14, 2018 · 2 comments
Closed

Comments

@mbutterick
Copy link
Collaborator

As seen here. Thereby producing the perplexing result:

(path-has-extension? (string->path "foobar") #"") ; #true
(path-has-extension? (string->path "foobar") #"bar") ; #true
(path-has-extension? (string->path "foobar") #"oobar") ; #true
(path-has-extension? (string->path "foobar") #"foobar") ; #false 

If the comparator were >= rather than >, then the last example would be #true.

@mflatt
Copy link
Member

mflatt commented Jun 14, 2018

The "not exactly the same as" constraint is explicit in the specification of path-has-extension?. The intent is to avoid treating at dot at the beginning of a path as an extension separator.

@mbutterick
Copy link
Collaborator Author

OK. I remember the earlier discussion at #1307. I thought, erroneously, that a notion of dot-prefixing was still embedded in the idea of an “extension”.

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