Skip to content

Commit

Permalink
[core] Strip name of game installation folder
Browse files Browse the repository at this point in the history
Thanks Kerbal Space Program for having an invalid
directory name as your set folder!
  • Loading branch information
derrod committed Jan 5, 2023
1 parent 00f025d commit 6b8273f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion legendary/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -1383,7 +1383,7 @@ def prepare_download(self, game: Game, base_game: Game = None, base_path: str =
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)
Expand Down

0 comments on commit 6b8273f

Please sign in to comment.