diff --git a/borg-gui.sh b/borg-gui.sh
index 47cc7da..959636e 100755
--- a/borg-gui.sh
+++ b/borg-gui.sh
@@ -151,14 +151,25 @@ elif [ "$choixmenu" = "ss" ];then
# Supprimmer une archive
borg_archive=$(borg list --short $borg_repo | zenity --height=500 --list --title "Listes des archives" --column "Archive")
- borg delete $borg_repo::$borg_archive | zenity --width=600 --progress --pulsate --auto-close
- zenity --width=600 --info --text="Suppresion de l'archive $borg_archive terminée"
+ if [ "$borg_archive" = "" ];then
+ zenity --width=600 --info --text "Aucune archive choisie, retour au menu"
+ else
+ borg delete $borg_repo::$borg_archive | zenity --width=600 --progress --pulsate --auto-close
+ zenity --width=600 --info --text="Suppresion de l'archive $borg_archive terminée"
+ fi
+
elif [ "$choixmenu" = "is" ];then
# Information archive
borg_archive=$(borg list --short $borg_repo | zenity --height=500 --list --title "Listes des archives" --column "Archive")
- zenity --width=600 --info --text="$(borg info $borg_repo::$borg_archive)" | zenity --width=600 --progress --pulsate --auto-close
+ if [ "$borg_archive" = "" ];then
+ zenity --width=600 --info --text "Aucune archive choisie, retour au menu"
+ else
+ borg_archive=$(borg list --short $borg_repo | zenity --height=500 --list --title "Listes des archives" --column "Archive")
+ zenity --width=600 --info --text="$(borg info $borg_repo::$borg_archive)" | zenity --width=600 --progress --pulsate --auto-close
+ fi
+
elif [ "$choixmenu" = "id" ];then
# Information sur le dépôt