Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixes.

  • Loading branch information...
commit c34786fddc3ba241edb9c50bcee76b0f0b8fcf11 1 parent c0a0846
MayDaniel authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/clj_ini/core.clj
View
4 src/clj_ini/core.clj
@@ -29,9 +29,9 @@ if it does not exist. Any comment metadata will be included."
(let [contents (read-lines (check-create file))
data-lines (remove #(not (includes? % \=)) contents)
meta-comments (meta (get-comments contents))]
- (if (empty? data-lines) {}
+ (if (empty? data-lines) (with-meta {} meta-comments)
(loop [lines data-lines acc {}]
- (if lines (with-meta acc meta-comments)
+ (if-not lines (with-meta acc meta-comments)
(let [[x & more] lines
[key val] (re-split #" = " x 2)]
(recur more (assoc acc (read-string key) (read-string val)))))))))
Please sign in to comment.
Something went wrong with that request. Please try again.