no tar for scripts

This commit is contained in:
Keagan McClelland
2022-05-12 13:35:52 -06:00
parent 93ee418f65
commit f44d432b6a
2 changed files with 8 additions and 6 deletions

View File

@@ -1123,9 +1123,12 @@ pub async fn install_s9pk<R: AsyncRead + AsyncSeek + Unpin>(
if tokio::fs::metadata(&script_dir).await.is_err() {
tokio::fs::create_dir_all(&script_dir).await?;
}
if let Some(hdl) = rdr.scripts().await? {
let mut tar = tokio_tar::Archive::new(hdl);
tar.unpack(script_dir).await?;
if let Some(mut hdl) = rdr.scripts().await? {
tokio::io::copy(
&mut hdl,
&mut File::open(script_dir.join("embassy.js")).await?,
)
.await?;
}
Ok(())