Kaynağa Gözat

No empty strings

Bob Mottram 8 yıl önce
ebeveyn
işleme
dde8e0fcf3
1 değiştirilmiş dosya ile 7 ekleme ve 5 silme
  1. 7
    5
      src/freedombone-controlpanel

+ 7
- 5
src/freedombone-controlpanel Dosyayı Görüntüle

1040
         do
1040
         do
1041
             app_index=$[choice-2]
1041
             app_index=$[choice-2]
1042
             app_name=${app_list[app_index]}
1042
             app_name=${app_list[app_index]}
1043
-            $restore_command "${app_name}"
1044
-            if [ ! "$?" = "0" ]; then
1045
-                dialog --title $"Restore apps from USB" \
1046
-                       --msgbox $"Restore of ${app_name} failed with code $?" 6 40
1047
-                return
1043
+            if [ ${#app_name} -gt 0 ]; then
1044
+                $restore_command "${app_name}"
1045
+                if [ ! "$?" = "0" ]; then
1046
+                    dialog --title $"Restore apps from USB" \
1047
+                           --msgbox $"Restore of ${app_name} failed with code $?" 6 40
1048
+                    return
1049
+                fi
1048
             fi
1050
             fi
1049
             ctr=$((ctr + 1))
1051
             ctr=$((ctr + 1))
1050
         done
1052
         done