all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: npostavs@users.sourceforge.net
Cc: 25419-done@debbugs.gnu.org, jidanni@jidanni.org
Subject: bug#25419: give better message when trying to go to forbidden areas
Date: Fri, 27 Jan 2017 10:59:08 +0200	[thread overview]
Message-ID: <83poj8280z.fsf@gnu.org> (raw)
In-Reply-To: <87inpbwwxa.fsf@users.sourceforge.net> (npostavs@users.sourceforge.net)

> From: npostavs@users.sourceforge.net
> Cc: 積丹尼 Dan Jacobson <jidanni@jidanni.org>,
>   25419@debbugs.gnu.org
> Date: Wed, 18 Jan 2017 22:28:17 -0500
> 
> 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.

OK, thanks.  I made that change, and I'm marking this bug done.





      reply	other threads:[~2017-01-27  8:59 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
2017-01-27  8:59     ` Eli Zaretskii [this message]

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=83poj8280z.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=25419-done@debbugs.gnu.org \
    --cc=jidanni@jidanni.org \
    --cc=npostavs@users.sourceforge.net \
    /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.