moved from 0/config to self/config...

This commit is contained in:
Sebastian Moser
2025-04-01 23:45:58 +02:00
parent 673ab2235d
commit d9ee9b5be4
6 changed files with 34 additions and 15 deletions

View File

@@ -89,8 +89,8 @@ pub fn init_logger(cli_matches: &ArgMatches) {
log_messages.push((Level::TRACE, format!("set log level from the verbose flags to {}", log_level)));
// check --log-level arg
if let Some(log_level_arg_string) = cli_matches.get_one::<&str>("log-level") {
let log_level_from_arg = match log_level_arg_string.to_lowercase().as_str() {
if let Some(log_level_arg_string) = cli_matches.get_one::<String>("log-level") {
let log_level_from_arg = match log_level_arg_string.to_owned().to_lowercase().as_str() {
"none" => LevelFilter::OFF,
"trace" => LevelFilter::TRACE,
"debug" => LevelFilter::DEBUG,

View File

@@ -112,7 +112,7 @@ pub fn os_instance_init(instance: &mut Instance) -> MizeResult<()> {
#[cfg(target_family = "windows")]
{
warn!("CONNECTING... would connect, but that is not implemented on windows yet");
error!("CONNECTING... would connect, but that is not implemented on windows yet");
}
} else {
@@ -216,13 +216,13 @@ fn download_module(instance: &mut Instance, store_path: &str, module_url: &str,
pub fn fetch_module(instance: &mut Instance, module_name: &str) -> MizeResult<String> {
if let Ok(module_path) = instance.get(format!("0/config/module_dir/{}", module_name))?.value_string() {
if let Ok(module_path) = instance.get(format!("self/config/module_dir/{}", module_name))?.value_string() {
return Ok(module_path);
} else {
// if null, load it from the url
let module_url = instance.get("0/config/module_url")?.value_string()?;
let module_url = instance.get("self/config/module_url")?.value_string()?;
let store_path = instance.get("0/config/store_path")?.value_string()?;
let store_path = instance.get("self/config/store_path")?.value_string()?;
let (module_hash, module_selector) = get_module_hash(instance, module_name, ItemData::new())?;
@@ -237,7 +237,7 @@ pub fn fetch_module(instance: &mut Instance, module_name: &str) -> MizeResult<St
pub fn load_module(instance: &mut Instance, module_name: &str, path: Option<String>) -> MizeResult<()> {
let module_dir_from_config = instance.get(format!("0/config/module_dir/{}", module_name));
let module_dir_from_config = instance.get(format!("self/config/module_dir/{}", module_name));
let module_path = if path.is_some() {
format!("{}/lib/libmize_module_{}.so", path.unwrap(), module_name)

View File

@@ -58,6 +58,7 @@ async fn connect_async(mut instance: Instance, store_path: PathBuf) -> MizeResul
Ok(())
});
let outgoing_cloned_instance = instance.clone();
instance.spawn("outgoing", move || {
let result = unix_outgoing(unix_write, send_rx, outgoing_cloned_instance, conn_id);