Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH] Tests for globbing below protected directories
- X-seq: zsh-workers 47910
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- Cc: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: Re: [PATCH] Tests for globbing below protected directories
- Date: Wed, 3 Feb 2021 15:06:41 -0800
- Archived-at: <https://zsh.org/workers/47910>
- Archived-at: <http://www.zsh.org/sympa/arcsearch_id/zsh-workers/2021-02/CAH%2Bw%3D7Y9_D9aucH7tzi29MBxmJ%3D-RuPV8Gb-GJUzPM1FkN-bAg%40mail.gmail.com>
- In-reply-to: <CAH+w=7b81vX7pT2nQt9PuybOLG8n6d3npTe31NRMiGvgaQZUJA@mail.gmail.com>
- List-id: <zsh-workers.zsh.org>
- References: <CAH+w=7bwDpyu0Anj5wpQ-v+ATFZ7fvqfz9RSeoE6ahRu=QVGLQ@mail.gmail.com> <20210126235605.GC25751@tarpaulin.shahaf.local2> <CAH+w=7Y7dTEVNz42zpTwmdWBeAV2UWVeYRZZjQhs5LzN2E_idg@mail.gmail.com> <20210203112225.GB12261@tarpaulin.shahaf.local2> <CAH+w=7b81vX7pT2nQt9PuybOLG8n6d3npTe31NRMiGvgaQZUJA@mail.gmail.com>
On Wed, Feb 3, 2021 at 2:33 PM Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
>
> Perhaps, but that's the definition of the difference between
> "readable" and "searchable" (executable) directories.
Put more concretely:
mode | opendir(x) | stat(x/name) |
dr-- | yes | no |
dr-x | yes | yes |
d--x | no | yes |
It's that first one that produces your surprising result, globbing
only returns names it can stat() and only pattern-matches in
directories it can opendir().
Messages sorted by:
Reverse Date,
Date,
Thread,
Author