diff --git a/src/common/user-store.ts b/src/common/user-store.ts index 145a57934c..ab07838f9b 100644 --- a/src/common/user-store.ts +++ b/src/common/user-store.ts @@ -238,23 +238,17 @@ export class UserStore extends BaseStore { this.kubectlBinariesPath = preferences.kubectlBinariesPath; this.openAtLogin = preferences.openAtLogin; - this.hiddenTableColumns.clear(); - if (preferences.hiddenTableColumns) { this.hiddenTableColumns.replace( preferences.hiddenTableColumns .map(([tableId, columnIds]) => [tableId, new ObservableToggleSet(columnIds)]) ); - } else { - this.hiddenTableColumns.clear(); } if (preferences.syncKubeconfigEntries) { this.syncKubeconfigEntries.replace( preferences.syncKubeconfigEntries.map(({ filePath, ...rest }) => [filePath, rest]) ); - } else { - this.syncKubeconfigEntries.clear(); } } diff --git a/src/main/catalog-sources/kubeconfig-sync.ts b/src/main/catalog-sources/kubeconfig-sync.ts index 89caec8f66..a4d31a3d1e 100644 --- a/src/main/catalog-sources/kubeconfig-sync.ts +++ b/src/main/catalog-sources/kubeconfig-sync.ts @@ -242,6 +242,8 @@ async function watchFileChanges(filePath: string, port: number): Promise<[ICompu }) .on("unlink", (childFilePath) => { stoppers.get(childFilePath)(); + stoppers.delete(childFilePath); + rootSource.delete(childFilePath); }) .on("error", error => logger.error(`${logPrefix} watching file/folder failed: ${error}`, { filePath }));