mirror of
https://github.com/moraroy/NonSteamLaunchers-On-Steam-Deck.git
synced 2024-12-21 15:21:52 +01:00
Update NSLGameScanner.py
This commit is contained in:
parent
439b9a20e9
commit
be11b4e04b
@ -596,17 +596,22 @@ if app_ids and not os.path.exists(non_steam_launchers_path):
|
|||||||
else:
|
else:
|
||||||
print('NonSteamLaunchers is symlinked to a different folder')
|
print('NonSteamLaunchers is symlinked to a different folder')
|
||||||
else:
|
else:
|
||||||
# Define the new path of the NonSteamLaunchers folder
|
# Check if the current path exists
|
||||||
new_path = os.path.join(compatdata_dir, str(first_app_id))
|
if os.path.exists(current_path):
|
||||||
|
# Define the new path of the NonSteamLaunchers folder
|
||||||
|
new_path = os.path.join(compatdata_dir, str(first_app_id))
|
||||||
|
|
||||||
# Move the NonSteamLaunchers folder to the new path
|
# Move the NonSteamLaunchers folder to the new path
|
||||||
shutil.move(current_path, new_path)
|
shutil.move(current_path, new_path)
|
||||||
|
|
||||||
# Define the path of the symbolic link
|
# Define the path of the symbolic link
|
||||||
symlink_path = os.path.join(compatdata_dir, 'NonSteamLaunchers')
|
symlink_path = os.path.join(compatdata_dir, 'NonSteamLaunchers')
|
||||||
|
|
||||||
|
# Create a symbolic link to the renamed NonSteamLaunchers folder
|
||||||
|
os.symlink(new_path, symlink_path)
|
||||||
|
else:
|
||||||
|
print(f"The directory {current_path} does not exist. Skipping.")
|
||||||
|
|
||||||
# Create a symbolic link to the renamed NonSteamLaunchers folder
|
|
||||||
os.symlink(new_path, symlink_path)
|
|
||||||
|
|
||||||
#End of Refactoring python code from .sh file
|
#End of Refactoring python code from .sh file
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user