Update NonSteamLaunchers.sh

This commit is contained in:
Roy 2024-06-21 08:31:11 -07:00 committed by GitHub
parent 19f173d5c5
commit 314463edfb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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