From: Christian Heller <c.heller@plomlompom.de>
Date: Fri, 4 Apr 2025 13:40:33 +0000 (+0200)
Subject: Fix.
X-Git-Url: https://plomlompom.com/repos/%22https:/validator.w3.org/static/test.html?a=commitdiff_plain;h=a191768aed2031b2ee7b716b0d7fdf5e9a51a07e;p=config

Fix.
---

diff --git a/testing/home/desktop/.local/bin/borgplom b/testing/home/desktop/.local/bin/borgplom
index 1ac2ce2..0a648f0 100755
--- a/testing/home/desktop/.local/bin/borgplom
+++ b/testing/home/desktop/.local/bin/borgplom
@@ -30,11 +30,9 @@ _check_args_n() {
     shift 2
     if [ "$#" -lt "${_N_MIN_ARGS}" ]; then
         error_exit_with_usage "missing arguments ($# instead of ${_N_MAX_ARGS})."
-    fi
-    shift "${_N_MAX_ARGS}"
-    if [ "$#" -gt 0 ]; then
-        _MSG="unexpected arguments beyond expected number: $@"
-        error_exit_with_usage "${_MSG}"
+    elif [ "$#" -gt "${_N_MAX_ARGS}" ]; then
+        shift "${_N_MAX_ARGS}"
+        error_exit_with_usage "unexpected arguments beyond expected number: $@"
     fi
 }