Skip to content

Commit bae1436

Browse files
committed
fixed bugs
1 parent 8e7e747 commit bae1436

File tree

3 files changed

+4
-7
lines changed

3 files changed

+4
-7
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
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
@@ -1,7 +1,7 @@
11
workspace = { members = [ "tests","tests/obfuscate_access_log_ips"] }
22
[package]
33
name = "ngxav"
4-
version = "0.5.0"
4+
version = "0.5.1"
55
edition = "2021"
66
license = "MIT"
77
description = "Search through NGINX logs with advanced filters and support for displaying analytics about your selected log entries"

src/utils/read_folder_conserve_memory.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,7 @@ pub fn read_folder_conserve_memory(file_path: String, isUnique: Option<bool>) {
1818
let mut occurrences: HashMap<String, bool> = HashMap::new();
1919
for path in paths {
2020
let p: String = path.unwrap().path().to_str().unwrap().to_string();
21-
if p.contains("error") {
22-
break;
23-
}
24-
if p.contains(".gz") {
21+
if !p.contains("error") && p.contains(".gz") {
2522
let file = File::open(p).expect("Ooops.");
2623
let reader = BufReader::new(GzDecoder::new(file));
2724
for r in reader.lines() {
@@ -49,7 +46,7 @@ pub fn read_folder_conserve_memory(file_path: String, isUnique: Option<bool>) {
4946
}
5047
}
5148
}
52-
} else {
49+
} else if !p.contains("error") {
5350
let file = File::open(p).expect("Ooops.");
5451
let reader = BufReader::new(file).lines();
5552
for line in reader.flatten() {

0 commit comments

Comments
 (0)