mirror of
https://github.com/usebruno/bruno.git
synced 2024-11-21 23:43:15 +01:00
fix ignore folders (#1929)
Co-authored-by: Linhart Lukáš <Lukas.Linhart@tescosw.cz>
This commit is contained in:
parent
0cce14b4d5
commit
acca7984a4
@ -415,12 +415,12 @@ class Watcher {
|
||||
ignoreInitial: false,
|
||||
usePolling: watchPath.startsWith('\\\\') ? true : false,
|
||||
ignored: (filepath) => {
|
||||
const normalizedPath = filepath.replace(/\\/g, '/');
|
||||
const relativePath = path.relative(watchPath, normalizedPath);
|
||||
const relativePath = path.relative(watchPath, filepath);
|
||||
const normalizedPath = relativePath.replace(/\\/g, '/');
|
||||
|
||||
return ignores.some((ignorePattern) => {
|
||||
const normalizedIgnorePattern = ignorePattern.replace(/\\/g, '/');
|
||||
return relativePath === normalizedIgnorePattern || relativePath.startsWith(normalizedIgnorePattern);
|
||||
return normalizedPath === normalizedIgnorePattern || normalizedPath.startsWith(normalizedIgnorePattern);
|
||||
});
|
||||
},
|
||||
persistent: true,
|
||||
|
Loading…
Reference in New Issue
Block a user