summaryrefslogtreecommitdiffstats
path: root/src/launcher
diff options
context:
space:
mode:
authorLibravatar bigfoot547 <[email protected]>2025-01-16 02:30:15 -0600
committerLibravatar bigfoot547 <[email protected]>2025-01-16 02:30:15 -0600
commit38ab8b70c132150cd974a33d11bdf8048b99fb23 (patch)
tree62f9141c9db23dcb9eb79901a48fe17ed291be87 /src/launcher
parentassets done (diff)
download client jar
Diffstat (limited to 'src/launcher')
-rw-r--r--src/launcher/assets.rs8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/launcher/assets.rs b/src/launcher/assets.rs
index 7d883d8..7ad368e 100644
--- a/src/launcher/assets.rs
+++ b/src/launcher/assets.rs
@@ -4,7 +4,7 @@ use std::fmt::{Display, Formatter};
use std::io::ErrorKind;
use std::path::{Path, PathBuf};
use std::path::Component::Normal;
-use futures::{stream, TryFutureExt, TryStreamExt};
+use futures::TryStreamExt;
use log::{debug, info, warn};
use sha1_smol::Sha1;
use tokio::{fs, io};
@@ -184,10 +184,6 @@ impl AssetRepository {
format!("{}{:02x}/{}", super::constants::URL_RESOURCE_BASE, obj.hash.bytes()[0], obj.hash)
}
- async fn download_assets(&self, index: &AssetIndex) -> Result<(), AssetError> {
- todo!()
- }
-
async fn ensure_dir(path: impl AsRef<Path>) -> Result<(), io::Error> {
match fs::create_dir(path).await {
Ok(_) => Ok(()),
@@ -198,7 +194,7 @@ impl AssetRepository {
pub async fn ensure_assets(&self, index: &AssetIndex) -> Result<(), AssetError> {
let mut downloads = Vec::new();
- let objects_path = [self.home.as_ref(), OsStr::new("objects")].iter().collect::<PathBuf>();
+ let objects_path = [self.home.as_ref(), OsStr::new(OBJECT_PATH)].iter().collect::<PathBuf>();
Self::ensure_dir(&objects_path).await.map_err(|e| AssetError::IO {
what: "creating objects directory",