From: Hans-Christoph Steiner Date: Tue, 27 Jun 2017 20:07:53 +0000 (+0200) Subject: update: create 'archive/' if needed when moving APKs X-Git-Tag: 0.8~29^2~4 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=39fd6647780f8c0c1089c69f89bb0281895ab807;p=fdroidserver.git update: create 'archive/' if needed when moving APKs 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. --- diff --git a/fdroidserver/update.py b/fdroidserver/update.py index 8488574f..151d6552 100644 --- a/fdroidserver/update.py +++ b/fdroidserver/update.py @@ -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: