Subject: bug#47601: 28.0.50; tramp-sh-handle-file-newer-than-file-p works on MacOS but not on Linux

From: Michael Albinus <[email-masked]>
Date: Tue, 06 Apr 2021 09:59:20 +0200

Sam Steingold <[email-masked]> writes:

Hi Sam,

> I get this error on Linux but not on MacOS:
>
> Debugger entered--Lisp error: (file-error "Files /home/sds/.emacs.d/notes and /scp:fence:/home/s/sds/.emacs.d/notes must have same method, user, host")
>   signal(file-error ("Files /home/sds/.emacs.d/notes and /scp:fence:/hom..."))
>   tramp-sh-handle-file-newer-than-file-p("/home/sds/.emacs.d/notes" "/scp:fence:/home/s/sds/.emacs.d/notes")
>   apply(tramp-sh-handle-file-newer-than-file-p ("/home/sds/.emacs.d/notes" "/scp:fence:/home/s/sds/.emacs.d/notes"))
>   tramp-sh-file-name-handler(file-newer-than-file-p "/home/sds/.emacs.d/notes" "/scp:fence:/home/s/sds/.emacs.d/notes")
>   apply(tramp-sh-file-name-handler file-newer-than-file-p ("/home/sds/.emacs.d/notes" "/scp:fence:/home/s/sds/.emacs.d/notes"))
>   tramp-file-name-handler(file-newer-than-file-p "/home/sds/.emacs.d/notes" "/scp:fence:/home/s/sds/.emacs.d/notes")
>   file-newer-than-file-p("~/.emacs.d/notes" "/scp:fence:~/.emacs.d/notes")

One of the both files returns tramp-time-dont-know in
file-attributes. However, there's no reason to fire an error in
Tramp. I've fixed this in master, could you, pls, check?

Best regards, Michael.