mirror of
https://github.com/zed-industries/zed.git
synced 2024-10-23 06:56:33 +00:00
extension: Delete working directory on uninstall (#17127)
Closes #17126 Release Notes: - N/A
This commit is contained in:
parent
32db140b95
commit
02e96821eb
1 changed files with 10 additions and 0 deletions
|
@ -772,6 +772,7 @@ impl ExtensionStore {
|
|||
|
||||
pub fn uninstall_extension(&mut self, extension_id: Arc<str>, cx: &mut ModelContext<Self>) {
|
||||
let extension_dir = self.installed_dir.join(extension_id.as_ref());
|
||||
let work_dir = self.wasm_host.work_dir.join(extension_id.as_ref());
|
||||
let fs = self.fs.clone();
|
||||
|
||||
match self.outstanding_operations.entry(extension_id.clone()) {
|
||||
|
@ -793,6 +794,15 @@ impl ExtensionStore {
|
|||
}
|
||||
});
|
||||
|
||||
fs.remove_dir(
|
||||
&work_dir,
|
||||
RemoveOptions {
|
||||
recursive: true,
|
||||
ignore_if_not_exists: true,
|
||||
},
|
||||
)
|
||||
.await?;
|
||||
|
||||
fs.remove_dir(
|
||||
&extension_dir,
|
||||
RemoveOptions {
|
||||
|
|
Loading…
Reference in a new issue