From cef7cd28889dccb5f4c15aa0d264d3ef6c85f64d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Daniel=20Mart=C3=AD?= Date: Mon, 30 Jun 2014 19:38:38 +0200 Subject: [PATCH] Support calling of 'fdroid init' from other places e.g. from a symlink to fdroid or from a script. Also more reliable in other cases where argv[0] is not what we want. --- fdroidserver/init.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fdroidserver/init.py b/fdroidserver/init.py index f55549ab..3a40eada 100644 --- a/fdroidserver/init.py +++ b/fdroidserver/init.py @@ -112,7 +112,7 @@ def main(): (options, args) = parser.parse_args() # find root install prefix - tmp = os.path.dirname(sys.argv[0]) + tmp = os.path.normpath(os.path.join(os.path.dirname(__file__), '..')) if os.path.basename(tmp) == 'bin': prefix = os.path.dirname(tmp) examplesdir = prefix + '/share/doc/fdroidserver/examples' -- 2.30.2