fix: disable watcher updates on env directories

This commit is contained in:
Anoop M D 2023-01-19 02:00:02 +05:30
parent dd71c9e71b
commit c4abe54c3f

View File

@ -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;
}