-
-
Notifications
You must be signed in to change notification settings - Fork 177
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
Opening absolute paths to folders containing exclamation marks fails #562
Comments
pyfilesystem2/fs/opener/parse.py Lines 41 to 57 in 8ed9dc4
This is why the above breaks. Why are we testing for |
A current workaround is to percent-encode the >>> import fs
>>> weird_path = 'C:\\Users\\Sebastian\\Documents\\Coding-Projects\\%21deploy_test\\foo'
>>> fs.open_fs(weird_path)
OSFS('C:\\Users\\Sebastian\\Documents\\Coding-Projects\\!deploy_test\\foo') |
Coincidentally, the comments in #561 seem relevant here too! (EDIT: |
Fair point. If this is expected behavior, could we add a note in the docs? It took me some time to figure out, so I'd expect to not be the only one who trips over this behavior.
This would limit us to OSFS only, right? The |
I know that using special characters in path names is asking for trouble, but I like to prefix active projects with an exclamation mark (
!
) because it makes them show up at the top when ordered alphabetically. This is incredibly useful when you have a lot of projects.As a result, I found this by accident while playing with a downstream library:
However, running the same using a relative path resolves as expected:
Is there a workaround for this behavior? I'm eager to have this fixed quickly, so if there is no workaround I could attempt a PR assuming this would lead to a reasonably fast release of the bugfix :)
The text was updated successfully, but these errors were encountered: