Skip to content

Commit

Permalink
less reflection
Browse files Browse the repository at this point in the history
  • Loading branch information
erdos committed Nov 15, 2023
1 parent 80bd0d6 commit 0ae98ad
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@ junit.xml
/*.docx
.DS_Store
.lsp/
*.jfr
*.jfr
.clj-kondo/
5 changes: 3 additions & 2 deletions src/stencil/process.clj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
[io.github.erdos.stencil.impl FileHelper ZipHelper])
(:require [clojure.java.io :as io]
[stencil.log :as log]
[stencil.model :as model]))
[stencil.model :as model]
[stencil.model.common :refer [unix-path]]))

(set! *warn-on-reflection* true)

Expand Down Expand Up @@ -57,7 +58,7 @@
(io!
(with-open [zipstream (new ZipOutputStream outstream)]
(doseq [[k writer] writers-map
:let [rel-path (FileHelper/toUnixSeparatedString (.toPath (io/file k)))
:let [rel-path (unix-path (io/file k))
ze (new ZipEntry rel-path)]]
(assert (not (.contains rel-path "../")))
(log/trace "ZIP: writing {}" rel-path)
Expand Down

0 comments on commit 0ae98ad

Please sign in to comment.