From: Hans-Christoph Steiner Date: Thu, 29 Jun 2017 18:28:16 +0000 (+0200) Subject: update: write cache file if anything has changed it X-Git-Tag: 0.8~29^2~2 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=e75cabfe77e6823b99d9b9df3899307fabc9d462;p=fdroidserver.git update: write cache file if anything has changed it This fixes a bug introduced in 04db6870 where cachechanged for scan_apks() was set only by the last call to scan_apk(). --- diff --git a/fdroidserver/update.py b/fdroidserver/update.py index 151d6552..1e368f6e 100644 --- a/fdroidserver/update.py +++ b/fdroidserver/update.py @@ -1385,11 +1385,12 @@ def scan_apks(apkcache, repodir, knownapks, use_date_from_apk=False): for apkfile in sorted(glob.glob(os.path.join(repodir, '*.apk'))): apkfilename = apkfile[len(repodir) + 1:] ada = options.allow_disabled_algorithms or config['allow_disabled_algorithms'] - (skip, apk, cachechanged) = scan_apk(apkcache, apkfilename, repodir, knownapks, - use_date_from_apk, ada, True) + (skip, apk, cachethis) = scan_apk(apkcache, apkfilename, repodir, knownapks, + use_date_from_apk, ada, True) if skip: continue apks.append(apk) + cachechanged = cachechanged or cachethis return apks, cachechanged