From 9ec3bacc9df15474e9f45f0d785d3cdca9dca1b8 Mon Sep 17 00:00:00 2001 From: TheOnePath Date: Tue, 15 Jun 2021 23:51:25 +0100 Subject: [PATCH] Fixed bug Logic error identifying if a backup file exists. --- utils/common | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/common b/utils/common index 7f8b013..45b7998 100755 --- a/utils/common +++ b/utils/common @@ -59,7 +59,7 @@ function restore_files { local log_out=$(realpath "${0%/*}/.log.1") [[ -e $1 ]] && log "ERROR" "Restore function was called without any arguments." "$log_out" local backup_file="/tmp/microsoft-edge-autoupdater/$(echo $1 | sed 's/\//_/').tar.gz" - [[ -f "$backup_file" ]] && { log "ERROR" "There is no backup of Microsoft Edge (Beta) identified. Restoration not possible." "$log_out" ; return 12 ; } + [[ ! -f "$backup_file" ]] && { log "ERROR" "There is no backup of Microsoft Edge (Beta) identified. Restoration not possible." "$log_out" ; return 12 ; } tar -xzf "$backup_file" "/" > "/tmp/microsoft-edge-autoupdater/tar_dump.log" 2>>"$log_out" exit_code=$? [[ ! $exit_code -eq 0 ]] && { log "ERROR" "There was an issue restoring pervious files to system." \