From 9a174c2001f5a4720121ed2d46bde9e448506a10 Mon Sep 17 00:00:00 2001 From: Thibaud Lopez Schneider Date: Wed, 18 May 2022 07:26:16 -0700 Subject: [PATCH] Update readfiles.js Fix Code scanning alert: - Title: Useless regular-expression character escape - File: lib/readfiles.js:21 - Description: The escape sequence '\.' is equivalent to just '.', so the sequence may still represent a meta-character when it is used in a regular expression. - Tool: CodeQL - Rule ID: js/useless-regexp-character-escape --- lib/readfiles.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/readfiles.js b/lib/readfiles.js index b615736..d3722f7 100644 --- a/lib/readfiles.js +++ b/lib/readfiles.js @@ -18,7 +18,7 @@ function buildFilter(filters) { return '[^\\/]*'; }) .replace(/\?/g, '[^\\/]?') - .replace(/\*\*/g, '\.*') + .replace(/\*\*/g, '.*') .replace(/([\-\+\|])/g, '\\$1') ); } @@ -164,4 +164,4 @@ readfiles.RELATIVE = 0; readfiles.FULL_PATH = 1; readfiles.FILENAME = 2; -module.exports = readfiles; \ No newline at end of file +module.exports = readfiles;