From 8ec28266b8929f597241f07aa6c8b637d34ec86e Mon Sep 17 00:00:00 2001 From: "Kevin Veen-Birkenbach [aka. Frantz]" Date: Wed, 2 Oct 2019 16:51:08 +0200 Subject: [PATCH] Added creation of decrypted folder just if the folder doesn't exist --- scripts/unlock.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/unlock.sh b/scripts/unlock.sh index e40bb61..e0f7133 100644 --- a/scripts/unlock.sh +++ b/scripts/unlock.sh @@ -6,7 +6,10 @@ # shellcheck source=/dev/null # Deactivate SC1090 source "$(dirname "$(readlink -f "${0}")")/base.sh" echo "Unlocking directory $DECRYPTED_PATH..." -echo "Creating directory $DECRYPTED_PATH..." -mkdir "$DECRYPTED_PATH" +if [ ! -d "$DECRYPTED_PATH" ] + then + echo "Creating directory $DECRYPTED_PATH..." + mkdir "$DECRYPTED_PATH" +fi echo "Encrypting directory $DECRYPTED_PATH to $DECRYPTED_PATH..." encfs "$ENCRYPTED_PATH" "$DECRYPTED_PATH" && echo "ATTENTION: DATA IS NOW DECRYPTED!"