Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
fixes percent encoding being broken (eg when steam opens ranger as default file manager)
may break paths that are actually named in percent encoding (that are not themselves percent encoded)
i imagine there's a better way to do this but this seems to work so far
ISSUE TYPE
(i feel like depending on definition it could be any or all of these)
RUNTIME ENVIRONMENT
CHECKLIST
CONTRIBUTING
document has been read [REQUIRED]DESCRIPTION
uses urllib.parse.urlparse and urllib.parse.unquote to, respectively, parse the path from a URI and decode URI percent encoding
potential better way would be to only unquote() the path if it is actually a file:// uri but i literally do not know python
MOTIVATION AND CONTEXT
my previous fix was to make the exo preferred filemanager a shell script that removed the file:// and replaced %20's with spaces before passing any path to ranger (the current apt version of ranger has a bug where it removes the leading slash of file uris, but that was fixed by cloning the repo)
TESTING
"What tests have been run?"
make test_py; make test
"How does the changes affect other areas of the codebase?"
shouldn't, apart from changing the argument parsing