Skip to content

Commit

Permalink
Fix: sanitize non-glob paths when globbing (#1147)
Browse files Browse the repository at this point in the history
  • Loading branch information
emmercm committed May 31, 2024
1 parent aa0d2d9 commit 06accc2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/types/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -729,7 +729,7 @@ export default class Options implements OptionsProps {
const dirname = pathsSplit.slice(0, i).join('/');
if (dirname === '') {
// fg won't let you escape empty strings
return `${dirname}/${pathsSplit.slice(i).join('/')}`;
return pathsSplit.slice(i).join('/');
}
return `${fg.escapePath(dirname)}/${pathsSplit.slice(i).join('/')}`;
}
Expand Down

0 comments on commit 06accc2

Please sign in to comment.