Sorted out sysout filename problem.

This commit is contained in:
Simon Brooke 2023-03-26 20:40:45 +01:00
parent 46f75a0c4f
commit 269d31df13
No known key found for this signature in database
GPG key ID: A7A4F18D1D4DF987
2 changed files with 6 additions and 4 deletions

3
.gitignore vendored
View file

@ -14,4 +14,5 @@ pom.xml.asc
*~ *~
.calva/ .calva/
.clj-kondo/ .clj-kondo/
.lsp/ .lsp/
resources/scratch.lsp

View file

@ -28,12 +28,13 @@
(str (:filepath *options*) (java.io.File/separator)) (str (:filepath *options*) (java.io.File/separator))
"") "")
(if (and (string? fp) (if (and (string? fp)
(> (count fp) 0)) (> (count fp) 0)
(not= fp "NIL"))
fp fp
(str "Sysout-" (local-date))) (str "Sysout-" (local-date)))
(if (ends-with? fp ".lsp") (if (ends-with? fp ".lsp")
fp ""
(str fp ".lsp")))) ".lsp")))
(defn SYSOUT (defn SYSOUT
"Dump the current content of the object list to file. If no `filepath` is "Dump the current content of the object list to file. If no `filepath` is