wineshelllink: Fall back to $HOME if $HOME/Desktop does not exist.

This commit is contained in:
Lei Zhang 2007-04-20 16:58:49 -07:00 committed by Alexandre Julliard
parent ec16e6323e
commit d0c83654f8
1 changed files with 7 additions and 1 deletions

View File

@ -220,7 +220,13 @@ if [ $mode = "menu" ] ; then
desktop_entry > "$xdg_data_dir/applications/wine/$link.desktop"
write_menu_file "wine$linkpath" "wine$linkpath/$linkname.desktop"
else
desktop_entry > "$HOME/Desktop/$linkname.desktop"
if [ -d "$HOME/Desktop" ]
then
desktop_target="$HOME/Desktop/$linkname.desktop"
else
desktop_target="$HOME/$linkname.desktop"
fi
desktop_entry > "$desktop_target"
fi
exit 0