Merge pull request #221 from CobaltCause/edit-mkdir-p

create leading directories if they don't exist
This commit is contained in:
Ryan Mulligan 2023-12-20 07:42:34 -08:00 committed by GitHub
commit 6cb7cd66c2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -181,7 +181,9 @@ function edit {
@ageBin@ "${ENCRYPT[@]}" <"$CLEARTEXT_FILE" || exit 1 @ageBin@ "${ENCRYPT[@]}" <"$CLEARTEXT_FILE" || exit 1
mv -f "$REENCRYPTED_FILE" "$1" mkdir -p "$(dirname "$FILE")"
mv -f "$REENCRYPTED_FILE" "$FILE"
} }
function rekey { function rekey {