From dde8e0fcf355e586578c955458a91b82fbef54b1 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Thu, 20 Oct 2016 17:16:02 +0100 Subject: [PATCH] No empty strings --- src/freedombone-controlpanel | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/freedombone-controlpanel b/src/freedombone-controlpanel index 6aefd1e3..c68815a9 100755 --- a/src/freedombone-controlpanel +++ b/src/freedombone-controlpanel @@ -1040,11 +1040,13 @@ function restore_data_from_storage { do app_index=$[choice-2] app_name=${app_list[app_index]} - $restore_command "${app_name}" - if [ ! "$?" = "0" ]; then - dialog --title $"Restore apps from USB" \ - --msgbox $"Restore of ${app_name} failed with code $?" 6 40 - return + if [ ${#app_name} -gt 0 ]; then + $restore_command "${app_name}" + if [ ! "$?" = "0" ]; then + dialog --title $"Restore apps from USB" \ + --msgbox $"Restore of ${app_name} failed with code $?" 6 40 + return + fi fi ctr=$((ctr + 1)) done