From a9d09ded8f1986a6735986f6fd34778fa2bba3bc Mon Sep 17 00:00:00 2001 From: "Trenton D. Adams" Date: Thu, 3 Jun 2021 22:26:23 -0600 Subject: [PATCH] fix gpg file detection bug --- changelog.md | 4 ++++ components/restore.sh | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/changelog.md b/changelog.md index 22fbba3..a0995f2 100644 --- a/changelog.md +++ b/changelog.md @@ -1,3 +1,7 @@ +### 2.3.3 +- make gpg file detection more reliable. Specifically the previous method + didn't work unless the gpg key was already cached + ### 2.3.2 - fix gpg decryption bug diff --git a/components/restore.sh b/components/restore.sh index 76ee767..ad63687 100644 --- a/components/restore.sh +++ b/components/restore.sh @@ -14,7 +14,7 @@ function doRestore() { for backup in ${source_folder}/${backup_name}.*.backup*; do echo "restoring ${backup}" - gpg --pinentry-mode cancel --list-packets "${backup}" > /dev/null + file "${backup}"| grep PGP if [ $? -eq 0 ]; then gpg -d -o - "${backup}" | tar -C "${destination_folder}" -g /dev/null -xvz else