Skip to content

Commit

Permalink
fixed file sorting in cm read_folder, updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
QpxDesign committed Mar 8, 2024
1 parent 484a925 commit 0464021
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 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.3"
version = "0.5.4"
edition = "2021"
license = "MIT"
description = "Search through NGINX logs with advanced filters and support for displaying analytics about your selected log entries"
Expand Down
4 changes: 4 additions & 0 deletions src/utils/read_folder_conserve_memory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ use std::fs;
use std::fs::metadata;
use std::fs::File;
use std::io::{BufRead, BufReader};
use std::time::SystemTime;

pub fn read_folder_conserve_memory(file_path: String, isUnique: Option<bool>) {
let mut paths: Vec<_> = fs::read_dir(file_path).unwrap().collect();
Expand All @@ -14,6 +15,9 @@ pub fn read_folder_conserve_memory(file_path: String, isUnique: Option<bool>) {
.unwrap()
.created()
.unwrap()
.duration_since(SystemTime::UNIX_EPOCH)
.unwrap()
.as_secs()
});
paths.reverse();
let mut occurrences: HashMap<String, bool> = HashMap::new();
Expand Down

0 comments on commit 0464021

Please sign in to comment.