From 90fe853f15a613580e7b4e272f4fb582d3776866 Mon Sep 17 00:00:00 2001 From: Michiel Borkent Date: Sun, 29 Mar 2020 14:50:57 +0200 Subject: [PATCH] notes app --- examples/notes.clj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/notes.clj b/examples/notes.clj index 8cd426e9..c23769ef 100755 --- a/examples/notes.clj +++ b/examples/notes.clj @@ -11,11 +11,11 @@ (.encodeToString (.getBytes (str user ":" password))))) (def notes-file (io/file (System/getProperty "user.home") ".notes" "notes.txt")) -(io/make-parents notes-file) (def file-lock (Object.)) (defn write-note! [note] (locking file-lock + (io/make-parents notes-file) (spit notes-file (str note "\n") :append true))) ;; hiccup-like