Subject: Re: bug#58360: 28.2; tramp-archive and file-directory-p

From: Stefan Kangas <[email-masked]>
Date: Fri, 7 Oct 2022 22:51:01 +0200

Gustavo Barros <[email-masked]> writes:

> I went down the rabbit hole, and it turns out that `file-directory-p'
> returns `t' for an ODT file appended with a slash.  And the reason it
> does is that `tramp-archive' is enabled by default, and that
> OpenDocument format extensions are included in `tramp-archive-suffixes'.
>
> So, if you try:
>
>     (file-directory-p (expand-file-name "~/file.odt/"))
>
> provided that "~/file.odt" exists, will return `t' on an "emacs -Q"
> session.

I can reproduce this on current master using:

    0. touch /tmp/file.odt
    1. emacs -Q --batch -eval \
        '(message "%s" (file-directory-p (expand-file-name "/tmp/file.odt/")))'

I get this output on stderr:

    t
    Tramp: Unmounting /tmp/file.odt

Maybe Michael has some ideas (in Cc).