-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Normalize case before comparing #4770
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
Conversation
@pfmoore Could you give this a try and see how this runs? |
Will do. Might not be till tomorrow... |
Cool. :) No hurries. |
2001c21
to
5306fbe
Compare
Ping! ^.^ |
Yeah, as far as I can tell it fixes the issue (and sorry for the delay!) |
Awesome! ^.^ |
A minor annoyance is that paths are now all represented as lowercase on Windows when prompting for removal ("c:/users/...") rather than as their canonical value ("C:/Users/..."). Solutions would include re-canonicalizing the paths (https://stackoverflow.com/questions/3692261/in-python-how-can-i-get-the-correctly-cased-path-for-a-file, https://stackoverflow.com/questions/2113822/python-getting-filename-case-as-stored-in-windows) or switch to pathlib as WindowsPath handles the comparisons fine. On the other hand it is indeed really only a minor annoyance. |
@anntzer Good point, I agree that we should be displaying pathnames to the user in the correct case as held on the filesystem. It's a quality of implementation issue, and as you say only a minor cosmetic annoyance, but I'd be happy to review and approve a PR to fix this. |
It's likely not that hard, I think something like
will work? (The diff on the test is just reverting this PR.) Feel free to adopt the patch as a PR. |
OK, I made #5642 based on your code. Thanks! One thing I wonder about - the original code here does Your version avoids that problem, though, so I think it's better in any case. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
To the degree that I can figure out, while on a break from doing math problem, this should fix the case problem with #4493.