chiark / gitweb /
Don't change the behaviour in debian setups
authorDaniel Martí <mvdan@mvdan.cc>
Mon, 30 Jun 2014 17:52:59 +0000 (19:52 +0200)
committerDaniel Martí <mvdan@mvdan.cc>
Mon, 30 Jun 2014 17:52:59 +0000 (19:52 +0200)
fdroidserver/init.py

index 3a40eada711a563fb7a4d2c970beeb84878b79e1..f0c5c8880b19fa070471b9c948f59a6afbd83f79 100644 (file)
@@ -112,13 +112,13 @@ def main():
     (options, args) = parser.parse_args()
 
     # find root install prefix
-    tmp = os.path.normpath(os.path.join(os.path.dirname(__file__), '..'))
+    tmp = os.path.dirname(sys.argv[0])
     if os.path.basename(tmp) == 'bin':
         prefix = os.path.dirname(tmp)
         examplesdir = prefix + '/share/doc/fdroidserver/examples'
     else:
         # we're running straight out of the git repo
-        prefix = tmp
+        prefix = os.path.normpath(os.path.join(os.path.dirname(__file__), '..'))
         examplesdir = prefix + '/examples'
 
     fdroiddir = os.getcwd()