chiark / gitweb /
server update: mkdir 'archive' if it does not exist
authorHans-Christoph Steiner <hans@eds.org>
Thu, 26 Jun 2014 19:46:47 +0000 (15:46 -0400)
committerHans-Christoph Steiner <hans@eds.org>
Fri, 27 Jun 2014 00:47:36 +0000 (20:47 -0400)
If `fdroid server update` is run with config that includes an archive, but
the 'archive' subdir does not exist, create it.  This mirrors the code that
is in `fdroid update`.  Seems to trivial to move to common.py.

fdroidserver/server.py

index 6e686017cdedc23966f12448ee13deba186255c8..9b46de70a95ad93b226949b304479c502d3cdbb7 100644 (file)
@@ -250,6 +250,8 @@ def main():
     repo_sections = ['repo']
     if config['archive_older'] != 0:
         repo_sections.append('archive')
+        if not os.path.exists('archive'):
+            os.mkdir('archive')
 
     if args[0] == 'init':
         if config.get('serverwebroot'):