home · contact · privacy
Fix.
authorChristian Heller <c.heller@plomlompom.de>
Thu, 3 Apr 2025 02:16:21 +0000 (04:16 +0200)
committerChristian Heller <c.heller@plomlompom.de>
Thu, 3 Apr 2025 02:16:21 +0000 (04:16 +0200)
testing/home/desktop/.local/bin/borgplom

index 04ce6734eca5da6b58fe981933fac2c08a7c444e..f14c57da7ace3f5313a65026eca94c0363d14a80 100755 (executable)
@@ -61,7 +61,7 @@ _check_args_n() {
     _N_MAX_ARGS="$1"
     shift 1
     if [ "$#" -lt "${_N_MAX_ARGS}" ]; then
-        error_exit "missing arguments ($# instead of ${_N_MAX_ARGS}."
+        error_exit "missing arguments ($# instead of ${_N_MAX_ARGS})."
     fi
     shift "${_N_MAX_ARGS}"
     if [ "$#" -gt 0 ]; then
@@ -76,8 +76,8 @@ HELP_ARGS_backup_keys=' PATH'
 HELP_DESC_backup_keys="copy known keys to PATH/, with their repos' server names as filenames"
 CMDFNC_backup_keys() {
     _check_args_n 1 "$@"
-    _PATH_TARGET_DIR="$1"
-    if [ -e "${_PATH_TARGET_DIR}"] && [ ! -d "${_PATH_TARGET_DIR}" ]; then
+    _PATH_TARGET_DIR=$(realpath "$1")
+    if [ -e "${_PATH_TARGET_DIR}" ] && [ ! -d "${_PATH_TARGET_DIR}" ]; then
         error_exit "non-directory at ${_PATH_TARGET_DIR}"
     fi
     mkdir -p "${_PATH_TARGET_DIR}"