vakdev / VakScript

Spaceglider for League of Legends.
163 stars 35 forks source link

Game paths wrong in autoconfig.py when Game is not installed in default Directory #49

Open d4rk0ne opened 7 months ago

d4rk0ne commented 7 months ago

when joining the paths with the defaults from data.py it results in wrong gamepaths. location of issue: https://github.com/vakdev/VakScript/blob/b4c64e9e90e7aa45d90942c9f3f583de4f2f0bd5/vakscript/autoconfig.py#L172 https://github.com/vakdev/VakScript/blob/b4c64e9e90e7aa45d90942c9f3f583de4f2f0bd5/vakscript/autoconfig.py#L173

example: data.py:

Info.game_files_path = '\Riot Games\League of Legends'
Info.settings_to_persist = 'DATA\CFG\defaults\SettingsToPersist.json'
Info.settings_to_persist_path = path.join(game_files_path, settings_to_persist)

results in '\Riot Games\League of Legends\DATA\CFG\defaults\SettingsToPersist.json'

when you join this with league_path from autoconfig.py it will look like:

league_path = "C:\Games\Riot Games\League of Legends"
settings_to_persist = os.path.join('C:\Games\Riot Games\League of Legends', '\\Riot Games\\League of Legends\\DATA\\CFG\\defaults\\SettingsToPersist.json')

resulting wrongly in: C:\Riot Games\League of Legends\DATA\CFG\defaults\SettingsToPersist.json

image