add total entry count to list

This commit is contained in:
Mystikfluu 2022-12-29 01:05:21 +01:00
parent 52c5fd45c3
commit 763342941c
3 changed files with 7 additions and 3 deletions

View File

@ -1,6 +1,6 @@
[package]
name = "ipass"
version = "0.3.0"
version = "0.3.1"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

View File

@ -1,6 +1,6 @@
# IPass
![IPass logo](../blob/master/IPass_logo.png?raw=true)
![IPass logo](../master/IPass_logo.png?raw=true)
## Secure your passwords, secure your life, with IPass.

View File

@ -104,10 +104,14 @@ fn help_message(args: &Vec<String>) {
}
fn list() {
let paths = std::fs::read_dir(utils::get_ipass_folder()).unwrap();
let mut paths = std::fs::read_dir(utils::get_ipass_folder()).unwrap();
let mut has_entry:bool = false;
println!("Total entries: {}\n", paths.count());
paths = std::fs::read_dir(utils::get_ipass_folder()).unwrap();
for path in paths {
has_entry = true;
println!("Entry: \"{}\"", path.unwrap().file_name().into_string().unwrap().replace(".ipass", ""));