From 65421a22996f0840bad4428bd612affb9ad773da Mon Sep 17 00:00:00 2001 From: Jon-William Lewis Date: Sun, 24 Jul 2016 11:51:46 -0500 Subject: [PATCH] Fixed a bug where sns tried to cd to a nonexistent store --- src/main/stage1.sns.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/stage1.sns.sh b/src/main/stage1.sns.sh index f9ba024..6e8f1ac 100644 --- a/src/main/stage1.sns.sh +++ b/src/main/stage1.sns.sh @@ -11,7 +11,7 @@ elif [ "$1" != "-i" ]; then exit 5 #ERR_NO_STORE fi -cd "$NOTES_DIR" +if [ -d "$NOTES_DIR" ]; then cd "$NOTES_DIR"; fi if [ "$ENCRYPTION" == "TRUE" ]; then # If the user chose not to decrypt notes before, clear that preference. if [ -r "$NOTES_DIR"/.do_not_decrypt ]; then @@ -69,7 +69,7 @@ else break;; *) printf " $RED_COLOR!$RESET_COLOR %s\n" "Please enter Y or N" - ;; + ;; esac done fi