Subject: Re: bug#70914: 29.3; Crashes often on Windows

From: Ihor Radchenko <[email-masked]>
Date: Thu, 23 May 2024 13:52:21 +0000

Eli Zaretskii <[email-masked]> writes:

> My point is that if the URI is "file://", the corresponding :path on
> Windows is not "//".

Sure. But what is passed to :activate-func is not a file path. It is
"Org mode link path". They are not the same in this specific case, but
there is nothing wrong on Org side.

>> IMHO, the bug is in file-exists-p:
>
> I don't think so.  "//" is an invalid file name on Windows, so the
> only requirement from file-exists-p in that case is not to crash.
> Which it does, after the recent fix.

IMHO, "invalid file name on Windows" leads to "trouble determining
whether the file exists". Then

    Return nil if FILENAME does not exist, or if there was trouble
    determining whether the file exists.

implies that nil is the expected return value.

AFAIU, this is what happens after the fix anyway, so there is nothing
more that should be done on Emacs side.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>