summaryrefslogtreecommitdiff
path: root/lisp/progmodes/compile.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/progmodes/compile.el')
-rw-r--r--lisp/progmodes/compile.el7
1 files changed, 6 insertions, 1 deletions
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index 94e4f3c6fa7..2c1e6ff52ec 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -3041,7 +3041,12 @@ TRUE-DIRNAME is the `file-truename' of DIRNAME, if given."
;; Get the specified directory from FILE.
(spec-directory
(if (cdr file)
- (file-truename (concat comint-file-name-prefix (cdr file))))))
+ ;; This function is active in `compilation-filter'.
+ ;; There could be problems to call `file-truename'
+ ;; for remote compilation processes.
+ (if (file-remote-p default-directory)
+ (concat comint-file-name-prefix (cdr file))
+ (file-truename (concat comint-file-name-prefix (cdr file)))))))
;; Check for a comint-file-name-prefix and prepend it if appropriate.
;; (This is very useful for compilation-minor-mode in an rlogin-mode