summary refs log tree commit diff stats
path: root/ranger.py
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2011-05-07 01:33:29 +0200
committerhut <hut@lavabit.com>2011-05-07 02:40:02 +0200
commit24e683189bbbe1082d7033c3c12670063e96c2df (patch)
tree55fb47385011422b72fe5772e8457f8662741c55 /ranger.py
parent06108111403b40196cbb40e7ad3b2480e6dc48de (diff)
downloadranger-24e683189bbbe1082d7033c3c12670063e96c2df.tar.gz
ranger.py: More reliable check for whether ./ranger.py is started
Diffstat (limited to 'ranger.py')
-rwxr-xr-xranger.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/ranger.py b/ranger.py
index ffdf13aa..53fd8bdb 100755
--- a/ranger.py
+++ b/ranger.py
@@ -48,7 +48,7 @@ sys.dont_write_bytecode = '-c' in argv or '--clean' in argv
 __doc__ = """Ranger - file browser for the unix terminal"""
 
 # Don't import ./ranger when running an installed binary at /usr/bin/ranger
-if os.path.isdir('ranger'):
+if os.path.exists('ranger') and '/' in os.path.normpath(__file__):
 	try:
 		sys.path.remove(os.path.abspath('.'))
 	except: