Bug#976865: Fwd: Bug#974900: dash removes trailing slash from script arguments

2020-12-12 Thread Florian Weimer
* Herbert Xu: > On Thu, Dec 10, 2020 at 08:58:37AM +0100, Aurelien Jarno wrote: >> >> That's the dash symptoms. glob(3) takes a pattern and just returns the >> paths matching the pattern, as they are named on the filesystem. That >> said, the option GLOB_MARK can return a trailing slash for all

Bug#976865: Fwd: Bug#974900: dash removes trailing slash from script arguments

2020-12-10 Thread Jeff King
On Fri, Dec 11, 2020 at 01:03:11PM +1100, Herbert Xu wrote: > On Thu, Dec 10, 2020 at 10:20:29AM -0500, Jeff King wrote: > > > > It seems like it happens for "foo/", too. If I compile: > > I think the key is that dash uses GLOB_NOMAGIC. I wondered that, too, but adding GLOB_NOMAGIC to the call

Bug#976865: Fwd: Bug#974900: dash removes trailing slash from script arguments

2020-12-10 Thread Herbert Xu
On Thu, Dec 10, 2020 at 10:20:29AM -0500, Jeff King wrote: > > It seems like it happens for "foo/", too. If I compile: I think the key is that dash uses GLOB_NOMAGIC. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key:

Bug#976865: Fwd: Bug#974900: dash removes trailing slash from script arguments

2020-12-10 Thread Jeff King
On Thu, Dec 10, 2020 at 10:35:08PM +1100, Herbert Xu wrote: > Yes but it's really a bug in glob(3). It should really return > a no-match for the case in question, rather than matching and then > returning a filename without the slash. > > IOW the pattern "foo\/" should not match a regular file

Bug#976865: Fwd: Bug#974900: dash removes trailing slash from script arguments

2020-12-10 Thread Herbert Xu
On Wed, Dec 09, 2020 at 01:27:17PM +0100, Aurelien Jarno wrote: > > Can you please describe more precisely what is the problem with glob(3)? Create a regular file called "foo", then call glob(3) with the pattern "foo\/". This returns a single match with the string "foo". This should return no

Bug#976865: Fwd: Bug#974900: dash removes trailing slash from script arguments

2020-12-10 Thread Herbert Xu
On Thu, Dec 10, 2020 at 08:58:37AM +0100, Aurelien Jarno wrote: > > That's the dash symptoms. glob(3) takes a pattern and just returns the > paths matching the pattern, as they are named on the filesystem. That > said, the option GLOB_MARK can return a trailing slash for all matched > path that

Bug#976865: Fwd: Bug#974900: dash removes trailing slash from script arguments

2020-12-10 Thread Aurelien Jarno
On 2020-12-10 13:56, Herbert Xu wrote: > Aurelien Jarno wrote: > > > > Can you please describe more precisely what is the problem with glob(3)? > > It's stripping trailing slashes from the pattern, even when the > name in question is a regular file. > >

Bug#976865: Fwd: Bug#974900: dash removes trailing slash from script arguments

2020-12-09 Thread Herbert Xu
Aurelien Jarno wrote: > > Can you please describe more precisely what is the problem with glob(3)? It's stripping trailing slashes from the pattern, even when the name in question is a regular file. https://patchwork.kernel.org/project/dash/patch/20201116025222.ga28...@gondor.apana.org.au/

Bug#976865: Fwd: Bug#974900: dash removes trailing slash from script arguments

2020-12-09 Thread Aurelien Jarno
On 2020-11-17 14:32, Herbert Xu wrote: > Andrej Shadura wrote: > > > > this is another bug report I have received. > > This is a bug in glob(3). Please dup and reassign to libc6. There > is a patch in the queue to disable glob by default again. > Can you please describe more precisely what