From 726eb8708a74024f9cd9eb078ba3495613c054ef Mon Sep 17 00:00:00 2001 From: ttionya Date: Wed, 3 Mar 2021 20:33:28 +0800 Subject: [PATCH] fix: fix the error in determining the existence of a file or folder (fixed #19) --- scripts/backup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/backup.sh b/scripts/backup.sh index f974a53..b019055 100644 --- a/scripts/backup.sh +++ b/scripts/backup.sh @@ -90,7 +90,7 @@ function upload() { color blue "upload backup file to storage system" # upload file not exist - if [[ ! -f "${UPLOAD_FILE}" ]]; then + if [[ ! -e "${UPLOAD_FILE}" ]]; then color red "upload file not found" send_mail_content "FALSE" "File upload failed at $(date +"%Y-%m-%d %H:%M:%S %Z"). Reason: Upload file not found."