diff --git a/kinode/src/state.rs b/kinode/src/state.rs index c5321547..9ca75ba8 100644 --- a/kinode/src/state.rs +++ b/kinode/src/state.rs @@ -404,7 +404,10 @@ async fn bootstrap( 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 - let _ = fs::remove_dir_all(&pkg_path).await; + let pkg_path = std::path::PathBuf::from(pkg_path); + if pkg_path.exists() { + fs::remove_dir_all(&pkg_path).await?; + } fs::create_dir_all(&pkg_path) .await .expect("bootstrap vfs dir pkg creation failed!");