ModuleUpdate: skip disabled/hidden folders (#1070)

* ModuleUpdate: skip non-worlds

* ModuleUpdate: don't skip _* folders

- _* folders may be used for libraries
- this means to properly disable a world, it has to be renamed with a preceding `.`
This commit is contained in:
black-sliver 2022-10-01 17:38:39 +02:00 committed by GitHub
parent 411cd51a92
commit b8e467fbb8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 4 deletions

View File

@ -13,6 +13,8 @@ update_ran = getattr(sys, "frozen", False) # don't run update if environment is
if not update_ran:
for entry in os.scandir(os.path.join(local_dir, "worlds")):
# skip .* (hidden / disabled) folders
if not entry.name.startswith("."):
if entry.is_dir():
req_file = os.path.join(entry.path, "requirements.txt")
if os.path.exists(req_file):