[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#58360: 28.2; tramp-archive and file-directory-p
From: |
Stefan Kangas |
Subject: |
bug#58360: 28.2; tramp-archive and file-directory-p |
Date: |
Fri, 7 Oct 2022 22:51:01 +0200 |
Gustavo Barros <gusbrs.2016@gmail.com> 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).
bug#58360: 28.2; tramp-archive and file-directory-p, Michael Albinus, 2022/10/08