Skip to content

Commit a797455

Browse files
committed
fixed a bug where desc would not match properly
1 parent 8304e0d commit a797455

File tree

5 files changed

+67
-102
lines changed

5 files changed

+67
-102
lines changed

Cargo.lock

Lines changed: 36 additions & 36 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ resolver = "2"
44

55
[workspace.package]
66
name = "plox"
7-
version = "0.3.0"
7+
version = "0.3.1"
88
authors = ["Moritz Baron"]
99
description = "PLOX - Plugin Load Order eXpert. PLOX is a tool for analyzing and sorting your plugin load order. Supports Morrowind, OpenMW and Cyberpunk"
1010
documentation = ""

gui/src/lib.rs

Lines changed: 13 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -123,27 +123,19 @@ fn init_parser(settings: AppSettings, tx: Sender<String>) -> Option<AppData> {
123123
}
124124

125125
// sort
126-
//let mut new_order = mods.clone();
127-
// check order first
128-
//match check_order(&mods, &parser.order_rules) {
129-
// true => {
130-
// // exit
131-
// info!("Mods are in correct order, no sorting needed.");
132-
// let _ = tx.send("Mods are in correct order, no sorting needed.".to_string());
133-
// }
134-
// false => {
135-
let mut sorter = new_stable_sorter();
136-
let _ = tx.send("Sorting mods".to_string());
137-
let new_order = match sorter.topo_sort(game, &mods, &parser.order_rules) {
138-
Ok(new) => new,
139-
Err(e) => {
140-
error!("error sorting: {e:?}");
141-
let _ = tx.send(format!("error sorting: {e:?}"));
142-
return None;
143-
}
144-
};
145-
//}
146-
//}
126+
let mut new_order = mods.iter().map(|m| m.name.clone()).collect();
127+
if !&parser.order_rules.is_empty() {
128+
let mut sorter = new_stable_sorter();
129+
let _ = tx.send("Sorting mods".to_string());
130+
new_order = match sorter.topo_sort(game, &mods, &parser.order_rules) {
131+
Ok(new) => new,
132+
Err(e) => {
133+
error!("error sorting: {e:?}");
134+
let _ = tx.send(format!("error sorting: {e:?}"));
135+
return None;
136+
}
137+
};
138+
}
147139

148140
let r = AppData {
149141
game,

src/expressions.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,7 @@ impl TExpression for DESC {
305305
for p in &plugins {
306306
if let Some(description) = &p.description {
307307
if let Ok(pattern) = regex::Regex::new(&self.regex) {
308+
let description = &description.to_lowercase();
308309
match self.is_negated {
309310
true => {
310311
if !pattern.is_match(description) {

0 commit comments

Comments
 (0)