Skip to content

Commit

Permalink
Update NSLGameScanner.py
Browse files Browse the repository at this point in the history
  • Loading branch information
moraroy committed Jun 22, 2024
1 parent 439b9a2 commit be11b4e
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions NSLGameScanner.py
Original file line number Diff line number Diff line change
Expand Up @@ -596,17 +596,22 @@ def create_new_entry(shortcutdirectory, appname, launchoptions, startingdir):
else:
print('NonSteamLaunchers is symlinked to a different folder')
else:
# Define the new path of the NonSteamLaunchers folder
new_path = os.path.join(compatdata_dir, str(first_app_id))
# Check if the current path exists
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
shutil.move(current_path, new_path)
# Move the NonSteamLaunchers folder to the new path
shutil.move(current_path, new_path)

# Define the path of the symbolic link
symlink_path = os.path.join(compatdata_dir, 'NonSteamLaunchers')
# Define the path of the symbolic link
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

Expand Down

0 comments on commit be11b4e

Please sign in to comment.