From 654af129e48f7e56d006e9b582349f6f8ca36a90 Mon Sep 17 00:00:00 2001 From: hut Date: Sat, 1 Oct 2011 02:01:06 +0200 Subject: Fixed minor issue in ranger.py --- ranger.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'ranger.py') diff --git a/ranger.py b/ranger.py index 1508b5de..44fc298f 100755 --- a/ranger.py +++ b/ranger.py @@ -35,7 +35,7 @@ return 1 """ import sys -from os.path import exists, normpath, abspath +from os.path import exists, abspath # Need to find out whether or not the flag --clean was used ASAP, # because --clean is supposed to disable bytecode compilation @@ -45,8 +45,8 @@ sys.dont_write_bytecode = '-c' in argv or '--clean' in argv # Set the actual docstring __doc__ = """Ranger - file browser for the unix terminal""" -# Don't import ./ranger when running an installed binary at /usr/bin/ranger -if exists('ranger') and '/' in normpath(__file__) and abspath('.') in sys.path: +# Don't import ./ranger when running an installed binary at /usr/.../ranger +if __file__[:4] == '/usr' and exists('ranger') and abspath('.') in sys.path: sys.path.remove(abspath('.')) # Start ranger -- cgit 1.4.1-2-gfad0