[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [patch] glob. If pattern has a trailing slash match directories only
From: |
Dmitry Goncharov |
Subject: |
Re: [patch] glob. If pattern has a trailing slash match directories only |
Date: |
Sun, 10 Nov 2019 12:17:36 -0500 |
Good morning.
On Sat, Nov 9, 2019 at 8:13 PM Bruno Haible <address@hidden> wrote:
> Are these issues supposed to be fixed in the new patch?
yes.
> (I appreciate that you add tests!):
It is easier to write a test program than to test glob manually.
> - Please follow GNU coding style, esp. regarding space between a function
> name and its arguments:
> int rc = symlink (old, new);
Done.
> - Similarly, add spaces around operators:
> GLOB_MARK | GLOB_ONLYDIR
Done.
> - The functions touch, md, ln, ln_s all return 0; better change the return
> type to 'void'.
Done
> - Why is 'verbose' an 'int'?
Personal preference.
> Couldn't it be a 'bool'?
Changed to bool.
1. To reproduce that a pattern with a trailing slash fails to filter
out files you'll libc with dirent that has no type field. That could
be an old glibc or sunos or aix libc.
2. You can use any libc to reproduce that GLOB_ONLYDIR fails to filter
out symlinks to files.
Thanks for review.
regards, Dmitry
match_slash_explicitly2.diff
Description: Text Data
- [patch] glob. If pattern has a trailing slash match directories only, Dmitry Goncharov, 2019/11/07
- Re: [patch] glob. If pattern has a trailing slash match directories only, Bruno Haible, 2019/11/09
- Re: [patch] glob. If pattern has a trailing slash match directories only,
Dmitry Goncharov <=
- Re: [patch] glob. If pattern has a trailing slash match directories only, Paul Eggert, 2019/11/10
- Re: [patch] glob. If pattern has a trailing slash match directories only, Dmitry Goncharov, 2019/11/12
- Re: [patch] glob. If pattern has a trailing slash match directories only, Dmitry Goncharov, 2019/11/17
- Re: [patch] glob. If pattern has a trailing slash match directories only, Paul Eggert, 2019/11/18
- Re: [patch] glob. If pattern has a trailing slash match directories only, Dmitry Goncharov, 2019/11/18