aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBozhidar Batsov <bozhidar@batsov.dev>2026-02-28 10:07:27 +0200
committerBozhidar Batsov <bozhidar@batsov.dev>2026-02-28 10:22:31 +0200
commit85ed45e80d0e12150548c80928f3da3e701e2313 (patch)
treea028d88ca9fd92621ebabc3e0ca7032a00172c49
parentd6bfdff3c262d9f36ec1a9b2e3f502336d37e79f (diff)
Use expand-file-name instead of file-truename in compilation-dir
file-truename resolves symlinks via synchronous I/O, which can hang Emacs when the project is on a remote host via TRAMP. expand-file-name is sufficient here (it normalizes path components) and works safely with remote paths.
-rw-r--r--projectile.el4
1 files changed, 1 insertions, 3 deletions
diff --git a/projectile.el b/projectile.el
index 9f12976..fe0e3d4 100644
--- a/projectile.el
+++ b/projectile.el
@@ -5411,9 +5411,7 @@ project of that type"
(comp-dir (or projectile-project-compilation-dir
(projectile-default-compilation-dir type))))
(if comp-dir
- (file-truename
- (concat (file-name-as-directory project-root)
- (file-name-as-directory comp-dir)))
+ (expand-file-name (file-name-as-directory comp-dir) project-root)
project-root)))
(defun projectile-maybe-read-command (arg default-cmd prompt)