Escape "." also for file://.

This commit is contained in:
Stefan Sundin 2021-04-29 08:25:14 -07:00
parent 254f255afe
commit 56ff521812

View file

@ -64,6 +64,7 @@ const matchPatternToRegExp = function(pattern) {
// special handling of file:// since there is no host
if (pattern.startsWith('file://')) {
let regex = '^';
pattern = pattern.replace(/\./g, '\\.');
if (pattern.endsWith('*')) {
regex += pattern.slice(0, -1);
}