From 19f173d5c5125fbf18d291a5124115cb9634c6a7 Mon Sep 17 00:00:00 2001 From: Roy <88516395+moraroy@users.noreply.github.com> Date: Fri, 21 Jun 2024 08:18:49 -0700 Subject: [PATCH] Update NonSteamLaunchers.sh --- NonSteamLaunchers.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/NonSteamLaunchers.sh b/NonSteamLaunchers.sh index 73acd30..80d186b 100755 --- a/NonSteamLaunchers.sh +++ b/NonSteamLaunchers.sh @@ -2348,7 +2348,9 @@ 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 @@ -2361,7 +2363,7 @@ if [[ -n "$userdata_folder" ]]; then # Check if shortcuts_vdf_path is not empty if [[ -n "$shortcuts_vdf_path" ]]; then # Create backup of shortcuts.vdf file - cp "$shortcuts_vdf_path" "$shortcuts_vdf_path.bak_$(date +%Y%m%d_%H%M%S)" + cp "$shortcuts_vdf_path" "$backup_dir/shortcuts_vdf.bak_$(date +%Y%m%d_%H%M%S)" else # Find config directory for current user config_dir=$(find "$userdata_folder" -maxdepth 1 -type d -name config)