All of lore.kernel.org
 help / color / mirror / Atom feed
From: Herbert Xu <herbert@gondor.apana.org.au>
To: Aurelien Jarno <aurelien@aurel32.net>
Cc: 976865@bugs.debian.org, andrew@shadura.me, dash@vger.kernel.org,
	peff@peff.net
Subject: Re: Bug#976865: Fwd: Bug#974900: dash removes trailing slash from script arguments
Date: Thu, 10 Dec 2020 22:35:08 +1100	[thread overview]
Message-ID: <20201210113508.GA28224@gondor.apana.org.au> (raw)
In-Reply-To: <20201210075837.GN2297@aurel32.net>

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 are a directory.

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 foo.

Note that the problem doesn't occur for "foo/".

Cheers,
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

  reply	other threads:[~2020-12-10 11:36 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-16 10:30 Fwd: Bug#974900: dash removes trailing slash from script arguments Andrej Shadura
2020-11-17  3:32 ` Herbert Xu
2020-12-09 12:27   ` Aurelien Jarno
2020-12-10  2:56     ` Bug#976865: " Herbert Xu
2020-12-10  7:58       ` Aurelien Jarno
2020-12-10 11:35         ` Herbert Xu [this message]
2020-12-10 15:20           ` Jeff King
2020-12-11  2:03             ` Herbert Xu
2020-12-11  2:05               ` Jeff King
2020-12-12 21:18           ` Florian Weimer
2020-12-10 12:12     ` Herbert Xu

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=20201210113508.GA28224@gondor.apana.org.au \
    --to=herbert@gondor.apana.org.au \
    --cc=976865@bugs.debian.org \
    --cc=andrew@shadura.me \
    --cc=aurelien@aurel32.net \
    --cc=dash@vger.kernel.org \
    --cc=peff@peff.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.
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.