GNU bug report logs - #58360
28.2; tramp-archive and file-directory-p

Previous Next

Package: emacs;

Reported by: Gustavo Barros <gusbrs.2016 <at> gmail.com>

Date: Fri, 7 Oct 2022 15:37:01 UTC

Severity: normal

Tags: notabug, wontfix

Found in version 28.2

Done: Stefan Kangas <stefankangas <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stefan Kangas <stefankangas <at> gmail.com>
To: Gustavo Barros <gusbrs.2016 <at> gmail.com>, 58360 <at> debbugs.gnu.org
Cc: Michael Albinus <michael.albinus <at> gmx.de>
Subject: bug#58360: 28.2; tramp-archive and file-directory-p
Date: Fri, 7 Oct 2022 22:51:01 +0200
Gustavo Barros <gusbrs.2016 <at> 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).




This bug report was last modified 2 years and 227 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.