mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-04-01 21:13:09 +00:00
miscellaneous fixes
This commit is contained in:
committed by
Aiden McClelland
parent
1eeffc0bf8
commit
e3d8861199
@@ -100,7 +100,7 @@ pub async fn cleanup(ctx: &RpcContext, id: &PackageId, version: &Version) -> Res
|
||||
ctx.docker.remove_image(&image.id, None, None).await
|
||||
}))
|
||||
.await?;
|
||||
let docker_path = Path::new(PKG_DOCKER_DIR).join(id).join(version.as_str());
|
||||
let docker_path = ctx.datadir.join(id).join(version.as_str());
|
||||
if tokio::fs::metadata(&docker_path).await.is_ok() {
|
||||
tokio::fs::remove_dir_all(&docker_path).await?;
|
||||
}
|
||||
|
||||
@@ -181,7 +181,7 @@ pub async fn download_install_s9pk(
|
||||
.join(pkg_id)
|
||||
.join(version.as_str());
|
||||
tokio::fs::create_dir_all(&pkg_cache_dir).await?;
|
||||
let pkg_cache = AsRef::<Path>::as_ref(pkg_id).with_extension("s9pk");
|
||||
let pkg_cache = pkg_cache_dir.join(AsRef::<Path>::as_ref(pkg_id).with_extension("s9pk"));
|
||||
|
||||
let pkg_data_entry = crate::db::DatabaseModel::new()
|
||||
.package_data()
|
||||
@@ -415,7 +415,9 @@ pub async fn install_s9pk<R: AsyncRead + AsyncSeek + Unpin>(
|
||||
log::info!("Install {}@{}: Unpacking Docker Images", pkg_id, version);
|
||||
progress
|
||||
.track_read_during(progress_model.clone(), &ctx.db, || async {
|
||||
let image_tar_dir = Path::new(PKG_DOCKER_DIR)
|
||||
let image_tar_dir = ctx
|
||||
.datadir
|
||||
.join(PKG_DOCKER_DIR)
|
||||
.join(pkg_id)
|
||||
.join(version.as_str());
|
||||
if tokio::fs::metadata(&image_tar_dir).await.is_err() {
|
||||
|
||||
Reference in New Issue
Block a user