Skip to content

Commit

Permalink
fix: 修复无法正确统计处理的文件数的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
ghtz08 committed Oct 3, 2020
1 parent e85353c commit 53acbf7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ fn main() {
fn decode(files: &Vec<Box<Path>>) -> usize {
let cfg = cfg::get();

let mut count = 0usize;

let mut buf = [0; 16 * 1024];
for file in files {
let mut origin = match fs::File::open(&file) {
Expand Down Expand Up @@ -58,8 +60,9 @@ fn decode(files: &Vec<Box<Path>>) -> usize {
}
}
println!(r#"Ok : "{}""#, file.display());
count += 1;
}
0
count
}

fn get_all_files(target: &Path, recursive: bool) -> Vec<Box<Path>> {
Expand Down

0 comments on commit 53acbf7

Please sign in to comment.