1
0
Fork 0
mirror of synced 2024-12-25 00:03:20 -05:00

Check for empty sources_non_forked_cache folder

This commit is contained in:
Wu Tingfeng 2022-11-24 19:49:27 +08:00
parent 92ee19d643
commit 22cbb862ee
No known key found for this signature in database

View file

@ -12,7 +12,7 @@ import tempfile
import urllib.request
import zipfile
from io import BytesIO
from os import path
from os import listdir, path
# --- Globals ----------------------------------------------
PLUGINS = """
@ -105,7 +105,7 @@ def update(plugin):
if __name__ == "__main__":
temp_directory = tempfile.mkdtemp()
if not path.isdir(SOURCE_DIR):
if not path.isdir(SOURCE_DIR) or not listdir(SOURCE_DIR):
shutil.copytree(FALLBACK_SOURCE_DIR, SOURCE_DIR)
try: