From 4683e56b9d806c82316615a81ce02a8c4cc60414 Mon Sep 17 00:00:00 2001 From: Frederik Delaere Date: Thu, 18 Oct 2018 10:15:32 +0200 Subject: [PATCH] module load minimap resulted in minimap/x86_64/20160105 loaded, while minimap/x86_64/2.1 was marked as default. module list said minimap/x86_64/2.1 was loaded but in reality minimap/x86_64/20160105 is loaded. the reason this happened is because we broke out of the loop in the wrong place --- src/rsmodules.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rsmodules.rs b/src/rsmodules.rs index 14b6ef7..b94944c 100644 --- a/src/rsmodules.rs +++ b/src/rsmodules.rs @@ -444,9 +444,9 @@ fn module_action(rsmod: &mut Rsmodule, action: &str) { // possible non existing file if Path::new(&testpath).exists() && Path::new(&testpath).is_file() { modulefile = PathBuf::from(&testpath); + break 'outer; } - break 'outer; } if found && !module.0.starts_with(mdl) { @@ -476,9 +476,9 @@ fn module_action(rsmod: &mut Rsmodule, action: &str) { eprintln!("Module {} not found.", selected_module); ::std::process::exit(super::CRASH_MODULE_NOT_FOUND); } - // check of another version is already loaded // and replace it with the current one + let mut replaced_module: bool = false; let mut other: String = String::new(); if is_other_version_of_module_loaded(selected_module) && action == "load" {