]> arthur.barton.de Git - bup.git/blobdiff - lib/cmd/daemon-cmd.py
Remove $(dirname "$0") from sys.path
[bup.git] / lib / cmd / daemon-cmd.py
index ffe79ddade9ea70801fe97a918083e15e7aa871e..bc1157a3897796a76208876dacc3225c9dd341b3 100755 (executable)
@@ -15,9 +15,12 @@ exec "$bup_python" "$0"
 # end of bup preamble
 
 from __future__ import absolute_import
-import os, sys, getopt, socket, subprocess, fcntl
 
-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 getopt, socket, subprocess, fcntl
 
 from bup import compat, options, path
 from bup.helpers import *