You've already forked AstralRinth
forked from didirus/AstralRinth
@@ -18,7 +18,6 @@ pub async fn get() -> crate::Result<Settings> {
|
||||
#[tracing::instrument]
|
||||
pub async fn set(settings: Settings) -> crate::Result<()> {
|
||||
let state = State::get().await?;
|
||||
// Replaces the settings struct in the RwLock with the passed argument
|
||||
let (reset_io, reset_fetch) = async {
|
||||
let read = state.settings.read().await;
|
||||
(
|
||||
@@ -28,13 +27,17 @@ pub async fn set(settings: Settings) -> crate::Result<()> {
|
||||
}
|
||||
.await;
|
||||
|
||||
*state.settings.write().await = settings;
|
||||
{
|
||||
*state.settings.write().await = settings;
|
||||
}
|
||||
|
||||
if reset_io {
|
||||
state.reset_io_semaphore().await;
|
||||
}
|
||||
if reset_fetch {
|
||||
state.reset_fetch_semaphore().await;
|
||||
}
|
||||
|
||||
State::sync().await?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
@@ -149,7 +149,7 @@ pub async fn install_minecraft(
|
||||
let java_version = get_java_version_from_profile(profile, &version_info)
|
||||
.await?
|
||||
.ok_or_else(|| {
|
||||
crate::ErrorKind::LauncherError(
|
||||
crate::ErrorKind::OtherError(
|
||||
"No available java installation".to_string(),
|
||||
)
|
||||
})?;
|
||||
|
||||
@@ -39,8 +39,8 @@ impl Default for Settings {
|
||||
java_globals: JavaGlobals::new(),
|
||||
default_user: None,
|
||||
hooks: Hooks::default(),
|
||||
max_concurrent_downloads: 64,
|
||||
max_concurrent_writes: 100,
|
||||
max_concurrent_downloads: 10,
|
||||
max_concurrent_writes: 10,
|
||||
version: CURRENT_FORMAT_VERSION,
|
||||
collapsed_navigation: false,
|
||||
}
|
||||
|
||||
@@ -221,7 +221,7 @@ async fn get_all_jre_path() -> Result<HashSet<PathBuf>, JREError> {
|
||||
|
||||
#[cfg(target_os = "windows")]
|
||||
#[allow(dead_code)]
|
||||
const JAVA_BIN: &str = "java.exe";
|
||||
const JAVA_BIN: &str = "javaw.exe";
|
||||
|
||||
#[cfg(not(target_os = "windows"))]
|
||||
#[allow(dead_code)]
|
||||
|
||||
Reference in New Issue
Block a user