That's definitely what raises the error, though the comment implies to me that it's unexpected/undesirable that it is triggered.

On Thu, Sep 8, 2022 at 9:13 AM Lars Ingebrigtsen <larsi@gnus.org> wrote:
James Ferguson <james@faff.org> writes:

> When trying to close the terminal one way or another (with debug-on-error) I now
> get:
>
> Debugger entered--Lisp error: (file-error "File ‘.’ must be absolute")
>   signal(file-error ("File ‘.’ must be absolute"))
>   tramp-error((tramp-file-name "sshx" nil nil "4x02" nil "." nil) file-error "File `%s'
> must be absolute" ".")
>   tramp-file-name-unify((tramp-file-name "sshx" nil nil "4x02" nil "." nil) ".")

I think this is the same as bug#57572 -- it's bugging out here:

               ;; FIXME: This is a sanity check.  When this error
               ;; doesn't happen for a while, it can be removed.
               (or (file-name-absolute-p localname)
                   (tramp-error
                    vec 'file-error "File `%s' must be absolute" localname))

So I guess this sanity check should perhaps be removed?  Michael?