diff --git a/src/confetti/s3_deploy.clj b/src/confetti/s3_deploy.clj index 06318f3..00b9d1f 100644 --- a/src/confetti/s3_deploy.clj +++ b/src/confetti/s3_deploy.clj @@ -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)