diff --git a/usr/local/share/bastille/export.sh b/usr/local/share/bastille/export.sh index a044f9f5..4cd9f029 100644 --- a/usr/local/share/bastille/export.sh +++ b/usr/local/share/bastille/export.sh @@ -102,11 +102,11 @@ if echo "${TARGET}" | grep -q '\/'; then GETDIR="${TARGET}" TARGET=$(echo ${TARGET} | awk -F '\/' '{print $NF}') bastille_backupsdir=$(echo ${GETDIR} | sed "s/${TARGET}//") -else - # Check if backups directory/dataset exist - if [ ! -d "${bastille_backupsdir}" ]; then - error_notify "${COLOR_RED}Backups directory/dataset does not exist, See 'bastille bootstrap'.${COLOR_RESET}" - fi +fi + +# Check if backups directory/dataset exist +if [ ! -d "${bastille_backupsdir}" ]; then + error_notify "${COLOR_RED}Backups directory/dataset does not exist, See 'bastille bootstrap'.${COLOR_RESET}" fi # Check if is a ZFS system diff --git a/usr/local/share/bastille/import.sh b/usr/local/share/bastille/import.sh index 2d9077ea..f2290c3f 100644 --- a/usr/local/share/bastille/import.sh +++ b/usr/local/share/bastille/import.sh @@ -377,11 +377,11 @@ if echo "${TARGET}" | grep -q '\/'; then GETDIR="${TARGET}" TARGET=$(echo ${TARGET} | awk -F '\/' '{print $NF}') bastille_backupsdir=$(echo ${GETDIR} | sed "s/${TARGET}//") -else - # Check if backups directory/dataset exist - if [ ! -d "${bastille_backupsdir}" ]; then - error_notify "${COLOR_RED}Backups directory/dataset does not exist, See 'bastille bootstrap'.${COLOR_RESET}" - fi +fi + +# Check if backups directory/dataset exist +if [ ! -d "${bastille_backupsdir}" ]; then + error_notify "${COLOR_RED}Backups directory/dataset does not exist, See 'bastille bootstrap'.${COLOR_RESET}" fi # Check if archive exist then trim archive name