diff options
author | hut <hut@lavabit.com> | 2010-05-13 15:11:29 +0200 |
---|---|---|
committer | hut <hut@lavabit.com> | 2010-05-13 15:11:41 +0200 |
commit | 80d26787cac7b2655689dd7ba007c2b18f98c528 (patch) | |
tree | 1b75731c9199e58b24bcf7e3937d47099f994d6f /ranger | |
parent | 1903181524726664744f807d909ddc7687f8c0cf (diff) | |
download | ranger-80d26787cac7b2655689dd7ba007c2b18f98c528.tar.gz |
main: strip off leading "file://" in filenames
Mainly for compatibility with "open with.." programs which prepend a file://, like firefox
Diffstat (limited to 'ranger')
-rw-r--r-- | ranger/__main__.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ranger/__main__.py b/ranger/__main__.py index 3bb857c3..32ea729c 100644 --- a/ranger/__main__.py +++ b/ranger/__main__.py @@ -175,6 +175,8 @@ def main(): if arg.targets: target = arg.targets[0] + if target.startswith('file://'): + target = target[7:] if not os.access(target, os.F_OK): print("File or directory doesn't exist: %s" % target) sys.exit(1) |