Skip to content

Commit

Permalink
Launcher: fix detection of valid .apworld (#4267)
Browse files Browse the repository at this point in the history
  • Loading branch information
black-sliver authored Nov 28, 2024
1 parent 4938b5f commit ea5ff5f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion worlds/LauncherComponents.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit ea5ff5f

Please sign in to comment.