From 92a1de7500ded46cb08349e9d3af65b98088dfe4 Mon Sep 17 00:00:00 2001 From: Dominion5254 Date: Tue, 12 Aug 2025 15:46:01 -0600 Subject: [PATCH] remove entire service package directory on hard uninstall (#3007) * remove entire service package directory on hard uninstall * fix package path --- core/startos/src/service/uninstall.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/core/startos/src/service/uninstall.rs b/core/startos/src/service/uninstall.rs index 9a91e7b9e..843e72727 100644 --- a/core/startos/src/service/uninstall.rs +++ b/core/startos/src/service/uninstall.rs @@ -4,7 +4,7 @@ use models::PackageId; use crate::context::RpcContext; use crate::prelude::*; -use crate::volume::data_dir; +use crate::volume::PKG_VOLUME_DIR; use crate::{DATA_DIR, PACKAGE_DATA}; pub async fn cleanup(ctx: &RpcContext, id: &PackageId, soft: bool) -> Result<(), Error> { @@ -45,11 +45,11 @@ pub async fn cleanup(ctx: &RpcContext, id: &PackageId, soft: bool) -> Result<(), { let state = pde.state_info.expect_removing()?; if !soft { - for volume_id in &state.manifest.volumes { - let path = data_dir(DATA_DIR, &state.manifest.id, volume_id); - if tokio::fs::metadata(&path).await.is_ok() { - tokio::fs::remove_dir_all(&path).await?; - } + let path = Path::new(DATA_DIR) + .join(PKG_VOLUME_DIR) + .join(&state.manifest.id); + if tokio::fs::metadata(&path).await.is_ok() { + tokio::fs::remove_dir_all(&path).await?; } let logs_dir = Path::new(PACKAGE_DATA) .join("logs")