From 314463edfb0adb95813b366c1cdb11a1639da662 Mon Sep 17 00:00:00 2001 From: Roy <88516395+moraroy@users.noreply.github.com> Date: Fri, 21 Jun 2024 08:31:11 -0700 Subject: [PATCH] Update NonSteamLaunchers.sh --- NonSteamLaunchers.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/NonSteamLaunchers.sh b/NonSteamLaunchers.sh index 80d186b..80946ed 100755 --- a/NonSteamLaunchers.sh +++ b/NonSteamLaunchers.sh @@ -2348,10 +2348,6 @@ fi -# Define backup directory -backup_dir="$userdata_folder/shortcuts.vdf_backups" -mkdir -p "$backup_dir" - # Check if userdata folder was found if [[ -n "$userdata_folder" ]]; then # Userdata folder was found @@ -2362,6 +2358,10 @@ if [[ -n "$userdata_folder" ]]; then # Check if shortcuts_vdf_path is not empty if [[ -n "$shortcuts_vdf_path" ]]; then + # Define backup directory + backup_dir="$(dirname "$shortcuts_vdf_path")/shortcuts.vdf_backups" + mkdir -p "$backup_dir" + # Create backup of shortcuts.vdf file cp "$shortcuts_vdf_path" "$backup_dir/shortcuts_vdf.bak_$(date +%Y%m%d_%H%M%S)" else