diff --git a/fdroidserver/index.py b/fdroidserver/index.py index 5a179487..fc1b663c 100644 --- a/fdroidserver/index.py +++ b/fdroidserver/index.py @@ -1766,6 +1766,10 @@ def make_altstore(apps, apks, config, repodir, pretty=False): https://faq.altstore.io/distribute-your-apps/make-a-source https://faq.altstore.io/distribute-your-apps/updating-apps """ + if not any(Path(repodir).glob('*.ipa')): + # no IPA files present in repo, nothing to do here, exiting early + return + indent = 2 if pretty else None # for now alt-store support is english only for lang in ['en']: diff --git a/tests/index.TestCase b/tests/index.TestCase index 6e8ec89b..2f137608 100755 --- a/tests/index.TestCase +++ b/tests/index.TestCase @@ -869,6 +869,8 @@ class AltstoreIndexTest(unittest.TestCase): with tempfile.TemporaryDirectory() as tmpdir, TmpCwd(tmpdir): repodir = Path(tmpdir) / 'repo' repodir.mkdir() + with open(repodir / "fake.ipa", "w") as f: + f.write("") fdroidserver.index.make_altstore( apps,