]> arthur.barton.de Git - bup.git/blobdiff - lib/cmd/mux-cmd.py
Remove $(dirname "$0") from sys.path
[bup.git] / lib / cmd / mux-cmd.py
index a3b4d57a512cdc7f6114711f17234d1eb7ca3a11..64155e4aa4faa6c279c96542913409061df61a00 100755 (executable)
@@ -15,9 +15,12 @@ exec "$bup_python" "$0"
 # end of bup preamble
 
 from __future__ import absolute_import
-import os, struct, subprocess, sys
 
-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 struct, subprocess
 
 from bup import compat, options
 from bup.helpers import debug1, debug2, mux