Skip to content

Commit

Permalink
fixed bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
QpxDesign committed Mar 8, 2024
1 parent 8e7e747 commit bae1436
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
workspace = { members = [ "tests","tests/obfuscate_access_log_ips"] }
[package]
name = "ngxav"
version = "0.5.0"
version = "0.5.1"
edition = "2021"
license = "MIT"
description = "Search through NGINX logs with advanced filters and support for displaying analytics about your selected log entries"
Expand Down
7 changes: 2 additions & 5 deletions src/utils/read_folder_conserve_memory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,7 @@ pub fn read_folder_conserve_memory(file_path: String, isUnique: Option<bool>) {
let mut occurrences: HashMap<String, bool> = HashMap::new();
for path in paths {
let p: String = path.unwrap().path().to_str().unwrap().to_string();
if p.contains("error") {
break;
}
if p.contains(".gz") {
if !p.contains("error") && p.contains(".gz") {
let file = File::open(p).expect("Ooops.");
let reader = BufReader::new(GzDecoder::new(file));
for r in reader.lines() {
Expand Down Expand Up @@ -49,7 +46,7 @@ pub fn read_folder_conserve_memory(file_path: String, isUnique: Option<bool>) {
}
}
}
} else {
} else if !p.contains("error") {
let file = File::open(p).expect("Ooops.");
let reader = BufReader::new(file).lines();
for line in reader.flatten() {
Expand Down

0 comments on commit bae1436

Please sign in to comment.