Skip to content

Commit 2a30b1d

Browse files
carsakillersumneko
authored andcommitted
fix: addon uninstalling
1 parent f9739d6 commit 2a30b1d

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

client/src/addon_manager/models/addon.ts

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -328,11 +328,18 @@ export class Addon {
328328
for (const folder of vscode.workspace.workspaceFolders ?? []) {
329329
await this.disable(folder, true);
330330
}
331-
const moduleURI = vscode.Uri.joinPath(this.uri, "module");
332-
await filesystem.deleteFile(moduleURI, {
333-
recursive: true,
334-
useTrash: false,
331+
const files =
332+
(await filesystem.readDirectory(
333+
vscode.Uri.joinPath(this.uri, "module"),
334+
{ depth: 1 }
335+
)) ?? [];
336+
files.map((f) => {
337+
return filesystem.deleteFile(f.uri, {
338+
recursive: true,
339+
useTrash: false,
340+
});
335341
});
342+
await Promise.all(files);
336343
localLogger.info(`Uninstalled ${this.name}`);
337344
this.#installed = false;
338345
this.setLock(false);

0 commit comments

Comments
 (0)