From 4f7c295b8831007489cf1aa5c25e8df8a9c11986 Mon Sep 17 00:00:00 2001 From: Anoop M D Date: Wed, 10 Apr 2024 02:34:06 +0530 Subject: [PATCH] Revert "fix ignore folders (#1929)" (#2048) This reverts commit acca7984a42a8513ceacd8eb05957950268fb654. --- packages/bruno-electron/src/app/watcher.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/bruno-electron/src/app/watcher.js b/packages/bruno-electron/src/app/watcher.js index 9b8690f9..441bba3b 100644 --- a/packages/bruno-electron/src/app/watcher.js +++ b/packages/bruno-electron/src/app/watcher.js @@ -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,