use old link_to api when running on python 3.9 or older

This commit is contained in:
Marcus Gursch 2024-01-12 02:40:36 +01:00
parent a82a9d6e01
commit 98cf4aeaa8

View file

@ -134,7 +134,10 @@ if __name__ == "__main__":
if f.name in ["eldenring.exe", "er-patcher"]: if f.name in ["eldenring.exe", "er-patcher"]:
continue continue
if not (game_dir_patched / f).is_file(): if not (game_dir_patched / f).is_file():
if sys.version_info.minor >= 10:
(game_dir_patched / f).hardlink_to(f) (game_dir_patched / f).hardlink_to(f)
else:
f.link_to(game_dir_patched / f)
# start patched exe directly to avoid EAC # start patched exe directly to avoid EAC
steam_cmd = sys.argv[1 + sys.argv.index("--"):] steam_cmd = sys.argv[1 + sys.argv.index("--"):]