Commit dd0a9539 authored by Anders Blomdell's avatar Anders Blomdell
Browse files

Dont report empty path, i.e. .

parent 7306847f
[package]
name = "hashtoc"
version = "0.1.2"
version = "0.1.3"
authors = ["Anders Blomdell <anders.blomdell@control.lth.se>"]
build = "build.rs"
links = "libhash.a,libssl"
......
......@@ -502,6 +502,16 @@ fn dispatcher(options: clap::ArgMatches,
check_name(front.inode.path.as_os_str())) {
continue
}
let mut path = front.inode.path.as_path();
loop {
match path.strip_prefix("./") {
Ok(p) => path = p,
_ => break
}
}
if path.eq(Path::new("")) && front.kind != ' ' {
continue
}
match front.kind {
' ' => {
// Start of new path
......@@ -534,13 +544,6 @@ fn dispatcher(options: clap::ArgMatches,
Unused => (),
_ => unreachable!()
}
let mut path = front.inode.path.as_path();
loop {
match path.strip_prefix("./") {
Ok(p) => path = p,
_ => break
}
}
bprint!("{}:", front.kind);
bwrite!(path.as_os_str().as_bytes());
zprintln!();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment