Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions kinode/packages/app_store/app_store/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 2 additions & 0 deletions kinode/src/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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!");
Expand Down