diff --git a/kinode/packages/app_store/app_store/src/utils.rs b/kinode/packages/app_store/app_store/src/utils.rs index 003d4346..c7dfcfba 100644 --- a/kinode/packages/app_store/app_store/src/utils.rs +++ b/kinode/packages/app_store/app_store/src/utils.rs @@ -253,6 +253,15 @@ pub fn create_package_drive( })?) .send_and_await_response(VFS_TIMEOUT)??; + // DELETE the /pkg folder in the package drive + // in order to replace with the fresh one + Request::to(("our", "vfs", "distro", "sys")) + .body(serde_json::to_vec(&vfs::VfsRequest { + path: drive_name.clone(), + action: vfs::VfsAction::RemoveDirAll, + })?) + .send_and_await_response(VFS_TIMEOUT)??; + // convert the zip to a new package drive let response = Request::to(("our", "vfs", "distro", "sys")) .body(serde_json::to_vec(&vfs::VfsRequest { diff --git a/kinode/src/state.rs b/kinode/src/state.rs index 971ebc22..7e81e90b 100644 --- a/kinode/src/state.rs +++ b/kinode/src/state.rs @@ -403,6 +403,8 @@ async fn bootstrap( // create a new package in VFS let our_drive_name = [package_name, package_publisher].join(":"); let pkg_path = format!("{}/vfs/{}/pkg", &home_directory_path, &our_drive_name); + // delete anything currently residing in the pkg folder + fs::remove_dir_all(&pkg_path).await?; fs::create_dir_all(&pkg_path) .await .expect("bootstrap vfs dir pkg creation failed!");