GNU bug report logs -
#68976
30.0.50; Tramp: unexpected error when calling (file-remote-p "/dav:localhost#8000:/foo")
Previous Next
Reported by: Ihor Radchenko <yantar92 <at> posteo.net>
Date: Wed, 7 Feb 2024 16:06:02 UTC
Severity: normal
Found in version 30.0.50
Fixed in version 30.1
Done: Michael Albinus <michael.albinus <at> gmx.de>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Michael Albinus <michael.albinus <at> gmx.de> writes:
> You are right. It should have returned nil instead of the
> error. `file-remote-p' claims in its docstring
> ...
> --8<---------------cut here---------------start------------->8---
> Test whether FILE specifies a location on a remote system.
> --8<---------------cut here---------------end--------------->8---
> ...
>
> If you want to know, whether a file name has remote file name syntax,
> you should call
>
> (string-match-p tramp-file-name-regexp "/dav:localhost#8000:/foo")
>
> This variable is documented in the Tramp manual, node "(tramp) Change
> file name syntax".
Are you saying that I shouldn't use `file-remote-p'?
For me, the goal is to determine whether file is coming from trusted
place or not. By default, anything non-local (Urls, TRAMP paths, etc)
should not be trusted.
--
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>
This bug report was last modified 1 year and 185 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.