There was an error while loading. Please reload this page.
1 parent 8efa688 commit fcf16eaCopy full SHA for fcf16ea
1 file changed
src/archiveTree.ts
@@ -313,7 +313,22 @@ export class ArchiveTreeProvider implements vscode.TreeDataProvider<ArchiveTreeI
313
this.onDidChangeRootsEmitter.fire();
314
}
315
316
- refresh(): void {
+ async refresh(): Promise<void> {
317
+ for (const root of this.roots) {
318
+ const fileRootPath = root.fsPath;
319
+ const validMods = await findValidModFolders(root);
320
+ if (validMods.length > 1) {
321
+ this.hasMultipleMods.add(fileRootPath);
322
+ } else {
323
+ this.hasMultipleMods.delete(fileRootPath);
324
+ if (validMods.length === 1) {
325
+ this.logicalRoots.set(fileRootPath, validMods[0]!.fsPath);
326
327
+ this.logicalRoots.delete(fileRootPath);
328
+ }
329
330
331
+ await this.persistLogicalRoots();
332
this.onDidChangeTreeDataEmitter.fire(undefined);
333
334
0 commit comments