From acca7984a42a8513ceacd8eb05957950268fb654 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Linhart?= Date: Tue, 9 Apr 2024 22:59:14 +0200 Subject: [PATCH] fix ignore folders (#1929) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Linhart Lukáš --- 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 441bba3b2..9b8690f9d 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 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,