Skip to content

Commit

Permalink
Fix relative-path function. Closes #15
Browse files Browse the repository at this point in the history
  • Loading branch information
jjttjj authored and martinklepsch committed Feb 24, 2017
1 parent db6e756 commit cfa41cb
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/confetti/s3_deploy.clj
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,8 @@
(string? (:secret-key cred))) cred))

(defn ^:private relative-path [dir f]
(string/replace (.getCanonicalPath f)
(re-pattern (str (.getCanonicalPath dir) "/"))
""))
(.getPath
(.relativize (.toURI dir) (.toURI f))))

(defn get-bucket-objects [cred bucket-name]
(validate-creds! cred)
Expand Down

0 comments on commit cfa41cb

Please sign in to comment.