[core] Strip name of game installation folder

Thanks Kerbal Space Program for having an invalid
directory name as your set folder!
This commit is contained in:
derrod 2023-01-05 17:28:32 +01:00
parent 00f025dcc9
commit 6b8273f983

View file

@ -1383,7 +1383,7 @@ class LegendaryCore:
self.log.info(f'"{base_path}" does not exist, creating...')
os.makedirs(base_path)
install_path = os.path.normpath(os.path.join(base_path, game_folder))
install_path = os.path.normpath(os.path.join(base_path, game_folder.strip()))
# check for write access on the install path or its parent directory if it doesn't exist yet
base_path = os.path.dirname(install_path)