diff --git a/CHANGELOG.md b/CHANGELOG.md index 496f8536..66742d78 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +- [#380](https://github.com/clojure-emacs/clj-refactor.el/issues/380) clean-ns: fix FileNotFoundException, by trying both the absolute path and the path relative to the project root. This requires a new refactor-nrepl, old versions will only check the absolute path. + ## 2.4.0 (2018-08-26) - Compatible with CIDER 0.17 and 0.18. diff --git a/clj-refactor.el b/clj-refactor.el index 284b7ce9..ace765ed 100644 --- a/clj-refactor.el +++ b/clj-refactor.el @@ -2732,10 +2732,12 @@ removed." (unless (and *cljr--noninteractive* (not (buffer-modified-p))) (save-buffer)) - (let ((path (or path (cljr--project-relative-path (buffer-file-name))))) + (let ((path (or path (buffer-file-name))) + (relative-path (cljr--project-relative-path path))) (when-let (new-ns (cljr--call-middleware-sync (cljr--create-msg "clean-ns" "path" path + "relative-path" relative-path "libspec-whitelist" cljr-libspec-whitelist "prune-ns-form" (if no-prune? "false" "true"))