Skip to content

Commit

Permalink
Only unlink files if they exist.
Browse files Browse the repository at this point in the history
On windows the watcher throws exceptions about unlinking non-existent files.
This might fix it...
See #17 (comment)
  • Loading branch information
Vinai committed Nov 18, 2018
1 parent 605d086 commit b0d61f0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/file/system.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@
(str buffer)))))

(defn rm [file]
(.unlinkSync fs file))
(when (exists? file)
(.unlinkSync fs file)))

(defn rmdir
"Remove the given directory if it is empty."
Expand Down

0 comments on commit b0d61f0

Please sign in to comment.