15 lines
402 B
Python
15 lines
402 B
Python
from izzylib.steam import get_libraries
|
|
|
|
|
|
def get_save_path():
|
|
for library in get_libraries():
|
|
game = library.game(49520)
|
|
|
|
if game:
|
|
for path in game.compat.join('pfx/drive_c/users/steamuser').listdir():
|
|
if path.endswith('Borderlands 2'):
|
|
for savepath in path.join('WillowGame/SaveData').listdir(False):
|
|
return savepath
|
|
|
|
raise KeyError('Cannot find Borderlands 2 save location')
|