Skip to content

Commit

Permalink
Bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
kimono-koans committed May 31, 2023
1 parent d366951 commit 4a76887
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 17 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,6 +1,6 @@
[package]
name = "dano"
version = "0.7.1"
version = "0.7.2"
edition = "2021"
keywords = ["checksum", "verify", "media", "cli-utility", "storage"]
description = "A CLI tool for generating checksums of media bitstreams"
Expand Down
36 changes: 21 additions & 15 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@
// that was distributed with this source code.

use std::{
borrow::Cow,
collections::HashSet,
ffi::OsStr,
path::{Path, PathBuf}, collections::HashSet, borrow::Cow,
path::{Path, PathBuf},
};

use clap::{crate_name, crate_version, Arg, ArgMatches};
Expand Down Expand Up @@ -412,8 +414,11 @@ impl Config {
})
.filter(|path| {
if path.file_name() == Some(OsStr::new(hash_file)) {
eprintln!("Error: File name is the name of a dano hash file: {:?}", path);
return false
eprintln!(
"Error: File name is the name of a dano hash file: {:?}",
path
);
return false;
}

true
Expand All @@ -437,9 +442,8 @@ impl Config {
}

Some(Either::Right(path.as_path()))
}).partition_map(|item|{
item
});
})
.partition_map(|item| item);

if !opt_silent && !bad_extensions.is_empty() {
let unique: HashSet<Cow<str>> = bad_extensions.into_iter().collect();
Expand All @@ -448,19 +452,21 @@ impl Config {

unique.iter().for_each(|ext| {
buffer.push_str(ext);
buffer.push_str(" ");
buffer.push(' ');
});

eprintln!("WARNING: The following are extensions which are unknown to dano: {:?}. dano has excluded all files with these extensions. If you know these file types are acceptable to ffmpeg, you may use --disable-filter to force dano to accept their use.", buffer.trim());
}

valid_paths.iter().map(|path| {
if opt_canonical_paths {
path.canonicalize().unwrap_or_else(|_| path.to_path_buf())
} else {
path.to_path_buf()
}
})
.collect()
valid_paths
.iter()
.map(|path| {
if opt_canonical_paths {
path.canonicalize().unwrap_or_else(|_| path.to_path_buf())
} else {
path.to_path_buf()
}
})
.collect()
}
}

0 comments on commit 4a76887

Please sign in to comment.