You've already forked AstralRinth
forked from didirus/AstralRinth
Wire Profile Backend to Frontend (#71)
* Search updates * fixes2 * Some more work * start instance page wiring * Pack installation + Profile viewing * Remove print statement * Fix disappearing profiles * fix compile err * Finish Instance Running * remove print statement * fix prettier * Fix clippy + early return
This commit is contained in:
@@ -137,7 +137,15 @@ pub async fn profile_create(
|
||||
let path = canonicalize(&path)?;
|
||||
let mut profile = Profile::new(name, game_version, path.clone()).await?;
|
||||
if let Some(ref icon) = icon {
|
||||
profile.set_icon(icon).await?;
|
||||
let bytes = tokio::fs::read(icon).await?;
|
||||
profile
|
||||
.set_icon(
|
||||
&state.directories.caches_dir(),
|
||||
&state.io_semaphore,
|
||||
bytes::Bytes::from(bytes),
|
||||
&icon.to_string_lossy(),
|
||||
)
|
||||
.await?;
|
||||
}
|
||||
if let Some((loader_version, loader)) = loader {
|
||||
profile.metadata.loader = loader;
|
||||
|
||||
Reference in New Issue
Block a user