Do not set DEFAULT_DECRYPT in function edit

Edit is called multiple times during rekey

fixes #272
This commit is contained in:
Christian Kögler 2024-10-13 13:47:32 +02:00
parent f6291c5935
commit 2b11774452

View file

@ -151,9 +151,8 @@ function edit {
CLEARTEXT_DIR=$(@mktempBin@ -d) CLEARTEXT_DIR=$(@mktempBin@ -d)
CLEARTEXT_FILE="$CLEARTEXT_DIR/$(basename "$FILE")" CLEARTEXT_FILE="$CLEARTEXT_DIR/$(basename "$FILE")"
DEFAULT_DECRYPT+=(-o "$CLEARTEXT_FILE")
decrypt "$FILE" "$KEYS" || exit 1 decrypt "$FILE" "$KEYS" >"$CLEARTEXT_FILE" || exit 1
[ ! -f "$CLEARTEXT_FILE" ] || cp "$CLEARTEXT_FILE" "$CLEARTEXT_FILE.before" [ ! -f "$CLEARTEXT_FILE" ] || cp "$CLEARTEXT_FILE" "$CLEARTEXT_FILE.before"