Merge pull request #56 from papajoker/master

fix cancel dialog btn
This commit is contained in:
Chrysostomus 2017-02-22 13:01:42 +02:00 committed by GitHub
commit 3e38f5523a

View File

@ -148,12 +148,14 @@ id_system() {
check_for_error() {
local _msg="$1"
local _err="${2:-0}"
local _canceldlg=1
((${_err}!=0)) && _msg="[${_msg}][${_err}]"
[[ -f "${ERR}" ]] && {
_msg="${_msg} $(head -n1 ${ERR})"
_canceldlg=0 # not btn cancel
rm "${ERR}"
}
if ((${_err}!=0)); then
if ((${_err}!=0)) && ((${_canceldlg}==0)); then
# and function varsdump ? _msg="$_msg \n $(declare -p | grep -v " _")"
echo -e "$(date +%D\ %T) ERROR ${_msg}" >> "${LOGFILE}"
DIALOG " $_ErrTitle " --msgbox "\n${_msg}\n" 0 0
@ -161,7 +163,6 @@ check_for_error() {
else
echo -e "$(date +%D\ %T) ${_msg}" >> "${LOGFILE}"
fi
}
# Add locale on-the-fly and sets source translation file for installer