Launcher: handle apworld installation (#3472)

This commit is contained in:
Fabian Dill
2024-06-06 01:36:02 +02:00
committed by GitHub
parent c554c3fdae
commit 93cd13736a
3 changed files with 72 additions and 3 deletions

View File

@@ -10,7 +10,11 @@ from typing import Dict, List, TypedDict, Optional
from Utils import local_path, user_path
local_folder = os.path.dirname(__file__)
user_folder = user_path("worlds") if user_path() != local_path() else None
user_folder = user_path("worlds") if user_path() != local_path() else user_path("custom_worlds")
try:
os.makedirs(user_folder, exist_ok=True)
except OSError: # can't access/write?
user_folder = None
__all__ = {
"network_data_package",