Skip to content

Commit

Permalink
remember to close file channels
Browse files Browse the repository at this point in the history
  • Loading branch information
levand committed Oct 6, 2017
1 parent d3e0c7b commit 8893b28
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion project.clj
@@ -1,4 +1,4 @@
(defproject org.arachne-framework/arachne-fileset "1.6.0"
(defproject org.arachne-framework/arachne-fileset "1.6.1"
:description "Tools for managing immutable filesets"
:url "http://github.com/arachne-framework/arachne-fileset"
:license {:name "Eclipse Public License"
Expand Down
5 changes: 4 additions & 1 deletion src/arachne/fileset/impl.clj
Expand Up @@ -66,7 +66,10 @@
(locking channel
(.position channel 0)
(FileUtils/copyToFile (Channels/newInputStream channel) f)))
f)))
f))
Object
(finalize [_]
(when channel (.close channel))))

This comment has been minimized.

Copy link
@jcf

jcf Jan 30, 2018

🎉


(declare ->TmpFileSet)
(defn fileset
Expand Down

0 comments on commit 8893b28

Please sign in to comment.