mirror of
https://github.com/usebruno/bruno.git
synced 2024-11-21 15:33:11 +01:00
parent
acca7984a4
commit
a2695ff2bf
@ -415,12 +415,12 @@ class Watcher {
|
|||||||
ignoreInitial: false,
|
ignoreInitial: false,
|
||||||
usePolling: watchPath.startsWith('\\\\') ? true : false,
|
usePolling: watchPath.startsWith('\\\\') ? true : false,
|
||||||
ignored: (filepath) => {
|
ignored: (filepath) => {
|
||||||
const relativePath = path.relative(watchPath, filepath);
|
const normalizedPath = filepath.replace(/\\/g, '/');
|
||||||
const normalizedPath = relativePath.replace(/\\/g, '/');
|
const relativePath = path.relative(watchPath, normalizedPath);
|
||||||
|
|
||||||
return ignores.some((ignorePattern) => {
|
return ignores.some((ignorePattern) => {
|
||||||
const normalizedIgnorePattern = ignorePattern.replace(/\\/g, '/');
|
const normalizedIgnorePattern = ignorePattern.replace(/\\/g, '/');
|
||||||
return normalizedPath === normalizedIgnorePattern || normalizedPath.startsWith(normalizedIgnorePattern);
|
return relativePath === normalizedIgnorePattern || relativePath.startsWith(normalizedIgnorePattern);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
persistent: true,
|
persistent: true,
|
||||||
|
Loading…
Reference in New Issue
Block a user