chiark / gitweb /
Also fix local.prop files before subdir
authorDaniel Martí <mvdan@mvdan.cc>
Mon, 26 Oct 2015 15:49:11 +0000 (16:49 +0100)
committerDaniel Martí <mvdan@mvdan.cc>
Mon, 26 Oct 2015 15:49:11 +0000 (16:49 +0100)
If subdir=foo/bar and there is a foo/local.properties file, it would not
get treated.

fdroidserver/common.py

index db2e0f09faaa01d6f61f4df85691b0c02fa3966a..d57f4c7e18b91b64a268f1b6b834a9e52a4647ba 100644 (file)
@@ -1283,7 +1283,11 @@ def prepare_source(vcs, app, build, build_dir, srclib_dir, extlib_dir, onserver=
     # Update the local.properties file
     localprops = [os.path.join(build_dir, 'local.properties')]
     if build['subdir']:
-        localprops += [os.path.join(root_dir, 'local.properties')]
+        parts = build['subdir'].split(os.sep)
+        cur = build_dir
+        for d in parts:
+            cur = os.path.join(cur, d)
+            localprops += [os.path.join(cur, 'local.properties')]
     for path in localprops:
         props = ""
         if os.path.isfile(path):