]> arthur.barton.de Git - bup.git/blobdiff - lib/cmd/gc-cmd.py
Remove $(dirname "$0") from sys.path
[bup.git] / lib / cmd / gc-cmd.py
index 71e4e75c7dc7bd34b03f5dd91cab3cc49c2850d5..d76533676126565ecdfd28df244212789f2f72da 100755 (executable)
@@ -15,9 +15,10 @@ exec "$bup_python" "$0"
 # end of bup preamble
 
 from __future__ import absolute_import
-import os.path, 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__)) + '/..'
 
 from bup import compat, git, options
 from bup.gc import bup_gc