]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix an error with remote file name in compile.el
authorMichael Albinus <michael.albinus@gmx.de>
Wed, 18 Dec 2019 09:19:19 +0000 (10:19 +0100)
committerMichael Albinus <michael.albinus@gmx.de>
Wed, 18 Dec 2019 09:19:19 +0000 (10:19 +0100)
* lisp/progmodes/compile.el (compilation-get-file-structure):
Compute proper remote file name.  (Bug#38648)

lisp/progmodes/compile.el

index 3fbd6eb2c7503c82f8308120c3c81517a9c1f8f4..197d52b2deaff7a755e3f1b18a9a02daf3f46c2e 100644 (file)
@@ -2936,21 +2936,15 @@ TRUE-DIRNAME is the `file-truename' of DIRNAME, if given."
       ;; Let's normalize it and look again.
       (let ((filename (car file))
            ;; Get the specified directory from FILE.
-           (spec-directory (if (cdr file)
-                               (file-truename (cdr file)))))
+           (spec-directory
+             (if (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
        ;; buffer.)
-       (when (and (boundp 'comint-file-name-prefix)
-                  (not (equal comint-file-name-prefix "")))
-         (if (file-name-absolute-p filename)
-             (setq filename
-                   (concat comint-file-name-prefix filename))
-           (if spec-directory
-               (setq spec-directory
-                     (file-truename
-                      (concat comint-file-name-prefix spec-directory))))))
+       (if (file-name-absolute-p filename)
+           (setq filename (concat comint-file-name-prefix filename)))
 
        ;; If compilation-parse-errors-filename-function is
        ;; defined, use it to process the filename.  The result might be a