Revert "fix ignore folders (#1929)"

This reverts commit acca7984a4.
This commit is contained in:
Anoop M D 2024-04-10 02:33:54 +05:30 committed by GitHub
parent acca7984a4
commit a2695ff2bf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -415,12 +415,12 @@ class Watcher {
ignoreInitial: false,
usePolling: watchPath.startsWith('\\\\') ? true : false,
ignored: (filepath) => {
const relativePath = path.relative(watchPath, filepath);
const normalizedPath = relativePath.replace(/\\/g, '/');
const normalizedPath = filepath.replace(/\\/g, '/');
const relativePath = path.relative(watchPath, normalizedPath);
return ignores.some((ignorePattern) => {
const normalizedIgnorePattern = ignorePattern.replace(/\\/g, '/');
return normalizedPath === normalizedIgnorePattern || normalizedPath.startsWith(normalizedIgnorePattern);
return relativePath === normalizedIgnorePattern || relativePath.startsWith(normalizedIgnorePattern);
});
},
persistent: true,