Skip to content

Commit

Permalink
fix: addon uninstalling
Browse files Browse the repository at this point in the history
  • Loading branch information
carsakiller authored and sumneko committed Oct 21, 2024
1 parent f9739d6 commit 2a30b1d
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions client/src/addon_manager/models/addon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -328,11 +328,18 @@ export class Addon {
for (const folder of vscode.workspace.workspaceFolders ?? []) {
await this.disable(folder, true);
}
const moduleURI = vscode.Uri.joinPath(this.uri, "module");
await filesystem.deleteFile(moduleURI, {
recursive: true,
useTrash: false,
const files =
(await filesystem.readDirectory(
vscode.Uri.joinPath(this.uri, "module"),
{ depth: 1 }
)) ?? [];
files.map((f) => {
return filesystem.deleteFile(f.uri, {
recursive: true,
useTrash: false,
});
});
await Promise.all(files);
localLogger.info(`Uninstalled ${this.name}`);
this.#installed = false;
this.setLock(false);
Expand Down

0 comments on commit 2a30b1d

Please sign in to comment.