Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Double-slash in the middle of the pattern is not collapsed #330

Closed
mgol opened this issue Aug 4, 2021 · 2 comments
Closed

Double-slash in the middle of the pattern is not collapsed #330

mgol opened this issue Aug 4, 2021 · 2 comments
Milestone

Comments

@mgol
Copy link

mgol commented Aug 4, 2021

Environment

  • OS Version: macOS 11.5.1 (20G80)
  • Node.js Version: v14.17.4

Actual behavior

console.log(fastGlob.sync('/app/*.json'));  // ["/app/package.json"]
console.log(fastGlob.sync('/app//*.json')); // []

Expected behavior

console.log(fastGlob.sync('/app/*.json'));  // ["/app/package.json"]
console.log(fastGlob.sync('/app//*.json')); // ["/app/package.json"]

Steps to reproduce

  1. See The code samples or open https://runkit.com/mgol/610aaad4e1d4410013466894. The glob package behaves as expected here.

Code sample

Code already provided above.

@mrmlnc
Copy link
Owner

mrmlnc commented Jan 1, 2022

Why do I think this is a bug?

The following implementations support this form of patterns:

  1. The original glob package;
  2. ls fixtures//*;
  3. python (glob.glob('fixtures//*'));
  4. golang (filepath.Glob("fixtures//*"));

@mrmlnc
Copy link
Owner

mrmlnc commented Jan 2, 2022

Fixed in the master branch by #339. The release with 3.2.8 version will be released soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants