From a3711eb463c64dcd0b6070bb7d0c7ca796250f51 Mon Sep 17 00:00:00 2001 From: black-sliver <59490463+black-sliver@users.noreply.github.com> Date: Thu, 28 Nov 2024 01:46:06 +0100 Subject: [PATCH] Launcher: fix detection of valid .apworld (#4272) --- worlds/LauncherComponents.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/worlds/LauncherComponents.py b/worlds/LauncherComponents.py index 3c4c4477..67806a73 100644 --- a/worlds/LauncherComponents.py +++ b/worlds/LauncherComponents.py @@ -103,7 +103,7 @@ def _install_apworld(apworld_src: str = "") -> Optional[Tuple[pathlib.Path, path try: import zipfile zip = zipfile.ZipFile(apworld_path) - directories = [f.filename.strip('/') for f in zip.filelist if f.CRC == 0 and f.file_size == 0 and f.filename.count('/') == 1] + directories = [f.name for f in zipfile.Path(zip).iterdir() if f.is_dir()] if len(directories) == 1 and directories[0] in apworld_path.stem: module_name = directories[0] apworld_name = module_name + ".apworld"