state.rs nit

This commit is contained in:
dr-frmr 2024-06-07 13:28:01 -06:00
parent 6ead2f39af
commit b64bb80eb6
No known key found for this signature in database

View File

@ -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!");