unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Philipp <p.stephani2@gmail.com>
Cc: 28567@debbugs.gnu.org
Subject: bug#28567: 27.0.50; `directory-files-recursively' signals an error if there is some inaccessible subdirectory
Date: Mon, 15 Jul 2019 11:53:55 +0200	[thread overview]
Message-ID: <877e8jei8c.fsf@mouse.gnus.org> (raw)
In-Reply-To: <wvr4a81laab2.fsf@gmail.com> (Philipp's message of "Sat, 23 Sep 2017 14:06:41 +0200")

Philipp <p.stephani2@gmail.com> writes:

> mkdir c c/c
> chmod 0000 c/c
> emacs -Q -batch -f toggle-debug-on-error -eval '(directory-files-recursively "/tmp/c" "foo")'
> Debug on Error enabled globally
> Debugger entered--Lisp error: (file-error "Opening directory" "Permission denied" "/tmp/c/c")
>   file-name-all-completions("" "/tmp/c/c")
>   directory-files-recursively("/tmp/c/c" "foo" nil)
>   directory-files-recursively("/tmp/c" "foo")
>   eval((directory-files-recursively "/tmp/c" "foo"))
>   command-line-1(("-f" "toggle-debug-on-error" "-eval" "(directory-files-recursively \"/tmp/c\" \"foo\")"))
>   command-line()
>   normal-top-level()
>
> It's probably fine to have this behavior by default (some users might
> want strict errors when some subdirectory couldn't be listed), but I
> think the function should have an optional argument to control the
> behavior.

Yup.  I've now fixed this on the trunk -- there's now an optional
PREDICATE parameter that can be t for "ignore file-error".

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





  reply	other threads:[~2019-07-15  9:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-23 12:06 bug#28567: 27.0.50; `directory-files-recursively' signals an error if there is some inaccessible subdirectory Philipp
2019-07-15  9:53 ` Lars Ingebrigtsen [this message]
2019-08-07 11:10   ` Philipp Stephani

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=877e8jei8c.fsf@mouse.gnus.org \
    --to=larsi@gnus.org \
    --cc=28567@debbugs.gnu.org \
    --cc=p.stephani2@gmail.com \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).