chiark / gitweb /
update: create 'archive/' if needed when moving APKs
authorHans-Christoph Steiner <hans@eds.org>
Tue, 27 Jun 2017 20:07:53 +0000 (22:07 +0200)
committerHans-Christoph Steiner <hans@eds.org>
Mon, 3 Jul 2017 08:02:51 +0000 (10:02 +0200)
Normally, just 'repo/' is created by default, e.g. `fdroid init`. If APKs
are dumped into 'repo/', then have invalid signatures, then they'll be
automatically moved to 'archive/', which therefore needs to exist.

fdroidserver/update.py

index 8488574f614c0f783cdf5d2a72284c5ce17f0275..151d6552c02f17b63324a42c182fb1066c93d8ac 100644 (file)
@@ -1493,6 +1493,8 @@ def move_apk_between_sections(from_dir, to_dir, apk):
         if ignore_missing and not os.path.exists(from_path):
             return
         to_path = os.path.join(to_dir, filename)
+        if not os.path.exists(to_dir):
+            os.mkdir(to_dir)
         shutil.move(from_path, to_path)
 
     if from_dir == to_dir: