]> arthur.barton.de Git - bup.git/blobdiff - lib/cmd/bloom-cmd.py
Remove $(dirname "$0") from sys.path
[bup.git] / lib / cmd / bloom-cmd.py
index 850382e5ed5bc07842b4f99f898e8b6700d49e3c..5f1c45d008d8e6c6eeba87667ffcd67411bda39c 100755 (executable)
@@ -15,9 +15,12 @@ exec "$bup_python" "$0"
 # end of bup preamble
 
 from __future__ import absolute_import
-import glob, os, sys, tempfile
 
-sys.path[:0] = [os.path.dirname(os.path.realpath(__file__)) + '/..']
+# Intentionally replace the dirname "$0" that python prepends
+import os, sys
+sys.path[0] = os.path.dirname(os.path.realpath(__file__)) + '/..'
+
+import glob, tempfile
 
 from bup import compat, options, git, bloom
 from bup.compat import argv_bytes, hexstr