about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2011-10-01 02:01:06 +0200
committerhut <hut@lavabit.com>2011-10-01 02:01:33 +0200
commit654af129e48f7e56d006e9b582349f6f8ca36a90 (patch)
treea61faad9eb67e25d305f6fec8a3cf57fba587ebe
parent185857d8fe28209f1d0203cb3a6aa851a7153a86 (diff)
downloadranger-654af129e48f7e56d006e9b582349f6f8ca36a90.tar.gz
Fixed minor issue in ranger.py
-rwxr-xr-xranger.py6
1 files changed, 3 insertions, 3 deletions
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