Core: load frozen decompressed worlds (#3488)
This commit is contained in:
parent
302017c69e
commit
0d9fce29c6
|
@ -107,8 +107,9 @@ for folder in (folder for folder in (user_folder, local_folder) if folder):
|
||||||
if not entry.name.startswith(("_", ".")):
|
if not entry.name.startswith(("_", ".")):
|
||||||
file_name = entry.name if relative else os.path.join(folder, entry.name)
|
file_name = entry.name if relative else os.path.join(folder, entry.name)
|
||||||
if entry.is_dir():
|
if entry.is_dir():
|
||||||
init_file_path = os.path.join(entry.path, '__init__.py')
|
if os.path.isfile(os.path.join(entry.path, '__init__.py')):
|
||||||
if os.path.isfile(init_file_path):
|
world_sources.append(WorldSource(file_name, relative=relative))
|
||||||
|
elif os.path.isfile(os.path.join(entry.path, '__init__.pyc')):
|
||||||
world_sources.append(WorldSource(file_name, relative=relative))
|
world_sources.append(WorldSource(file_name, relative=relative))
|
||||||
else:
|
else:
|
||||||
logging.warning(f"excluding {entry.name} from world sources because it has no __init__.py")
|
logging.warning(f"excluding {entry.name} from world sources because it has no __init__.py")
|
||||||
|
|
Loading…
Reference in New Issue