]> arthur.barton.de Git - bup.git/commitdiff
Resolve bup argv[0] symlinks.
authorDaniel Hahler <git@thequod.de>
Sat, 12 May 2012 19:28:22 +0000 (14:28 -0500)
committerRob Browning <rlb@defaultvalue.org>
Fri, 17 Aug 2012 18:42:58 +0000 (13:42 -0500)
Resolve any symlinks in argv[0] so that the subsequent PYTHONPATH
adjustment will work properly.

Signed-off-by: Daniel Hahler <git@thequod.de>
Acked-by: Gabriel Filion <lelutin@gmail.com>
Reviewed-by: Rob Browning <rlb@defaultvalue.org>
main.py

diff --git a/main.py b/main.py
index c8ffce2877da4cab5e0e6462c937ad0d6b21eec7..5229b26273a1f4dcecafa518f9e87c65be7b6a10 100755 (executable)
--- a/main.py
+++ b/main.py
@@ -2,7 +2,7 @@
 import sys, os, subprocess, signal, getopt
 
 argv = sys.argv
-exe = argv[0]
+exe = os.path.realpath(argv[0])
 exepath = os.path.split(exe)[0] or '.'
 exeprefix = os.path.split(os.path.abspath(exepath))[0]