diff --git a/CHANGELOG.md b/CHANGELOG.md index 38347fe..4bb5188 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ DEPS_CLJ_TOOLS_VERSION=1.11.1.1165 bb clojure ## Unreleased - Support older CPUs for native-image builds +- [#120](https://github.com/borkdude/deps.clj/issues/120): Use `java.nio` for writeable check rather than `java.io.File/canWrite` ## 1.11.1.1429 diff --git a/src/borkdude/deps.clj b/src/borkdude/deps.clj index 85609b5..d5381be 100755 --- a/src/borkdude/deps.clj +++ b/src/borkdude/deps.clj @@ -795,7 +795,7 @@ public class ClojureToolsDownloader { (.getPath (io/file xdg-config-home "clojure"))) (.getPath (io/file config-dir ".cpcache")))] (if (.exists (io/file deps-edn)) - (if (-> (io/file (or *dir* ".")) (.canWrite)) + (if (-> (io/file (or *dir* ".")) (.toPath) (java.nio.file.Files/isWritable)) {:cache-dir (.getPath (io/file *dir* ".cpcache")) :cache-dir-key *dir*} ;; can't write to *dir*/.cpcache