From 6d5a00357139c2e0e72767f766b94d9d5734719b Mon Sep 17 00:00:00 2001 From: Daniel Erat Date: Thu, 16 Jan 2025 08:07:44 -0400 Subject: [PATCH] passage: avoid extra slash in recipients path Make set_age_recipients() avoid embedding an extra slash in the recipients path when passed an empty directory, e.g. when reencrypting a file in the root of the store. --- src/password-store.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/password-store.sh b/src/password-store.sh index 02d3fb0..013cf64 100755 --- a/src/password-store.sh +++ b/src/password-store.sh @@ -67,7 +67,7 @@ set_age_recipients() { return fi - local current="$PREFIX/$1" + local current="$PREFIX${1:+/$1}" while [[ $current != "$PREFIX" && ! -f $current/.age-recipients ]]; do current="${current%/*}" done