From c4abe54c3f85b1a93de2d0b6bca3387a7c04c651 Mon Sep 17 00:00:00 2001 From: Anoop M D Date: Thu, 19 Jan 2023 02:00:02 +0530 Subject: [PATCH] fix: disable watcher updates on env directories --- packages/bruno-electron/src/app/watcher.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/bruno-electron/src/app/watcher.js b/packages/bruno-electron/src/app/watcher.js index d2aec80b..06844100 100644 --- a/packages/bruno-electron/src/app/watcher.js +++ b/packages/bruno-electron/src/app/watcher.js @@ -187,10 +187,9 @@ const add = async (win, pathname, collectionUid, collectionPath) => { }; const addDirectory = (win, pathname, collectionUid, collectionPath) => { - const dirname = path.dirname(pathname); const envDirectory = path.join(collectionPath, 'environments'); - if(dirname === envDirectory) { + if(pathname === envDirectory) { return; } @@ -248,10 +247,9 @@ const unlink = (win, pathname, collectionUid, collectionPath) => { } const unlinkDir = (win, pathname, collectionUid, collectionPath) => { - const dirname = path.dirname(pathname); const envDirectory = path.join(collectionPath, 'environments'); - if(dirname === envDirectory) { + if(pathname === envDirectory) { return; }