Added PORTWINE_DB_NEW

This commit is contained in:
2024-10-22 22:52:13 +05:00
parent 2703dd1e47
commit 334b49cd01
2 changed files with 41 additions and 8 deletions

View File

@ -5433,15 +5433,18 @@ portwine_create_shortcut () {
for df in "${DESKTOP_FILES_ARRAY[@]}" ; do
df="${df//"$PORT_WINE_PATH/"/}"
df="${df//.desktop/}"
if [[ ${PORTWINE_DB^^} =~ ${df^^} ]]
if [[ ${PORTWINE_DB^^} =~ ${df^^} ]] && [[ ${PORTWINE_DB^^} != ${df^^} ]]
then name_desktop="$df"
fi
done
fi
if [[ -z $name_desktop ]] ; then
if [[ -n $PORTPROTON_NAME ]]
then name_desktop="$PORTPROTON_NAME"
else name_desktop="$PORTWINE_DB"
if [[ ${PORTPROTON_NAME^^} =~ ${PORTWINE_DB^^} ]] \
&& [[ ${PORTPROTON_NAME^^} != "${PORTWINE_DB^^}" ]]
then
name_desktop="$PORTPROTON_NAME"
else
name_desktop="$PORTWINE_DB_NEW"
fi
fi
export name_desktop
@ -5492,7 +5495,7 @@ portwine_create_shortcut () {
edit_user_conf_from_gui PW_SHORTCUT_MENU PW_SHORTCUT_DESKTOP PW_SHORTCUT_STEAM
if [[ -n ${DESKTOP_FILES_ARRAY[1]} ]] ; then
if [[ -n ${DESKTOP_FILES_ARRAY[0]} ]] && [[ $name_desktop != $df ]] || [[ -n ${DESKTOP_FILES_ARRAY[1]} ]] ; then
if yad_question "${translations[A higher number of duplicate desktop files were found for this file.\\nShould I delete the extra ones or not?]}" ; then
for rm in "${DESKTOP_FILES_ARRAY[@]}" ; do
rm -f "$rm"