fix(RESTORE): strip trailing slash from backup-location

This commit is contained in:
Asif Bacchus 2021-02-08 10:31:03 -07:00
parent 78e1ed2539
commit 7b3ff7f6ae

View File

@ -202,7 +202,7 @@ while [ $# -gt 0 ]; do
-b|--backup-location) -b|--backup-location)
if [ -n "$2" ]; then if [ -n "$2" ]; then
if [ -d "$2" ] && [ -n "$( ls -A "$2" )" ]; then if [ -d "$2" ] && [ -n "$( ls -A "$2" )" ]; then
backupLocation="$2" backupLocation="${2%/}"
shift shift
else else
consoleError '1' "$1: cannot find specified backup location directory or it is empty." consoleError '1' "$1: cannot find specified backup location directory or it is empty."