From 7b3ff7f6aec2a06a56c002ea5bc9e0374738889f Mon Sep 17 00:00:00 2001 From: Asif Bacchus Date: Mon, 8 Feb 2021 10:31:03 -0700 Subject: [PATCH] fix(RESTORE): strip trailing slash from backup-location --- backup/restore.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backup/restore.sh b/backup/restore.sh index e830396..17d7cd4 100644 --- a/backup/restore.sh +++ b/backup/restore.sh @@ -202,7 +202,7 @@ while [ $# -gt 0 ]; do -b|--backup-location) if [ -n "$2" ]; then if [ -d "$2" ] && [ -n "$( ls -A "$2" )" ]; then - backupLocation="$2" + backupLocation="${2%/}" shift else consoleError '1' "$1: cannot find specified backup location directory or it is empty."