Skip to content

Commit

Permalink
fix root comparison when escaped symbols are used
Browse files Browse the repository at this point in the history
  • Loading branch information
SuperchupuDev committed Sep 30, 2024
1 parent 2c14c05 commit e9249d8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,8 @@ function crawl(options: GlobOptions, cwd: string, sync: boolean) {
}

// backslashes are removed so that inferred roots like `C:/New folder \\(1\\)` work
const api = new fdir(fdirOptions).crawl(properties.root.replace(/\\/g, ''));
properties.root = properties.root.replace(/\\/g, '');
const api = new fdir(fdirOptions).crawl(properties.root);

if (cwd === properties.root || options.absolute) {
return sync ? api.sync() : api.withPromise();
Expand Down

0 comments on commit e9249d8

Please sign in to comment.