From: npostavs@users.sourceforge.net
To: Eli Zaretskii <eliz@gnu.org>
Cc: 25419@debbugs.gnu.org, "積丹尼 Dan Jacobson" <jidanni@jidanni.org>
Subject: bug#25419: give better message when trying to go to forbidden areas
Date: Wed, 18 Jan 2017 22:28:17 -0500 [thread overview]
Message-ID: <87inpbwwxa.fsf@users.sourceforge.net> (raw)
In-Reply-To: <83wpe1cwd1.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 11 Jan 2017 19:58:02 +0200")
Eli Zaretskii <eliz@gnu.org> writes:
>> From: 積丹尼 Dan Jacobson
>> <jidanni@jidanni.org>
>> Date: Wed, 11 Jan 2017 22:44:08 +0800
>>
>> Do C-x C-f ~root
>> You will see:
>> Setting current directory: Success, /root/
>
> That's because /root has a file-name handler,
> tramp-completion-file-name-handler, and although that handler turns
> around and calls file-accessible-directory-p, the value of errno is
> lost in transition:
>
> /* If the file name has special constructs in it,
> call the corresponding file handler. */
> handler = Ffind_file_name_handler (absname, Qfile_accessible_directory_p);
> if (!NILP (handler))
> {
> Lisp_Object r = call2 (handler, Qfile_accessible_directory_p, absname);
> errno = 0;
> return r;
> }
>
> Is there any better way than arbitrarily set errno to EACCES if the
> handler returns something other than t?
AFAICT, not without changing the interface of
file-accessible-directory-p file handler, no.
next prev parent reply other threads:[~2017-01-19 3:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-11 14:44 bug#25419: give better message when trying to go to forbidden areas 積丹尼 Dan Jacobson
2017-01-11 17:58 ` Eli Zaretskii
2017-01-19 3:28 ` npostavs [this message]
2017-01-27 8:59 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87inpbwwxa.fsf@users.sourceforge.net \
--to=npostavs@users.sourceforge.net \
--cc=25419@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=jidanni@jidanni.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.