mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 12:11:56 +00:00
absolute path to package docker dir
This commit is contained in:
committed by
Aiden McClelland
parent
93fa2bebc4
commit
63ba125d2b
@@ -714,12 +714,13 @@ pub async fn install_s9pk<R: AsyncRead + AsyncSeek + Unpin>(
|
|||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
pub async fn load_images() -> Result<(), Error> {
|
pub async fn load_images(ctx: RpcContext) -> Result<(), Error> {
|
||||||
if tokio::fs::metadata(PKG_DOCKER_DIR).await.is_ok() {
|
let docker_dir = ctx.datadir.join(PKG_DOCKER_DIR);
|
||||||
ReadDirStream::new(tokio::fs::read_dir(PKG_DOCKER_DIR).await?)
|
if tokio::fs::metadata(&docker_dir).await.is_ok() {
|
||||||
|
ReadDirStream::new(tokio::fs::read_dir(&docker_dir).await?)
|
||||||
.map_err(|e| {
|
.map_err(|e| {
|
||||||
Error::new(
|
Error::new(
|
||||||
anyhow::Error::from(e).context(PKG_DOCKER_DIR),
|
anyhow::Error::from(e).context(format!("{:?}", &docker_dir)),
|
||||||
crate::ErrorKind::Filesystem,
|
crate::ErrorKind::Filesystem,
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user