Fixed a bug where sns tried to cd to a nonexistent store

This commit is contained in:
Jon-William Lewis
2016-07-24 11:51:46 -05:00
parent 568e2a6dbe
commit 65421a2299

View File

@@ -11,7 +11,7 @@ elif [ "$1" != "-i" ]; then
exit 5 #ERR_NO_STORE exit 5 #ERR_NO_STORE
fi fi
cd "$NOTES_DIR" if [ -d "$NOTES_DIR" ]; then cd "$NOTES_DIR"; fi
if [ "$ENCRYPTION" == "TRUE" ]; then if [ "$ENCRYPTION" == "TRUE" ]; then
# If the user chose not to decrypt notes before, clear that preference. # If the user chose not to decrypt notes before, clear that preference.
if [ -r "$NOTES_DIR"/.do_not_decrypt ]; then if [ -r "$NOTES_DIR"/.do_not_decrypt ]; then
@@ -69,7 +69,7 @@ else
break;; break;;
*) *)
printf " $RED_COLOR!$RESET_COLOR %s\n" "Please enter Y or N" printf " $RED_COLOR!$RESET_COLOR %s\n" "Please enter Y or N"
;; ;;
esac esac
done done
fi fi