diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2019-09-09 13:45:12 +0200 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2019-09-09 17:00:59 +0200 |
commit | 350918b63b572a0d8cdd18915106c3d7607ec383 (patch) | |
tree | 4332f0dff16febbfaa2b821b6db713e26645ef9c /net/src/wkd.rs | |
parent | f61f57d4ad1ee45b3d6b0014bf4339a6d1469f9b (diff) |
net: Remove progress reporting on stdout.
Diffstat (limited to 'net/src/wkd.rs')
-rw-r--r-- | net/src/wkd.rs | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/net/src/wkd.rs b/net/src/wkd.rs index 450c8442..1cad4b05 100644 --- a/net/src/wkd.rs +++ b/net/src/wkd.rs @@ -309,7 +309,6 @@ pub fn generate<S, T, P>(domain: S, tpks: &[TPK], base_path: P, { let domain = domain.as_ref(); let base_path = base_path.as_ref(); - println!("Generating WKD for domain {}.", domain); // Create the directories first, instead of creating it for every file. // Since the email local part would be the file name which is not created @@ -320,14 +319,13 @@ pub fn generate<S, T, P>(domain: S, tpks: &[TPK], base_path: P, // This can not fail, otherwise file_path would have fail. let dir_path = base_path.join( Path::new(&file_path).parent().unwrap()); - println!("Creating {:?} directory.", dir_path); + // With fs::create_dir_all the permissions can't be set. fs::DirBuilder::new() .mode(0o744) .recursive(true) .create(&dir_path)?; - let mut found_a_key = false; // Create the files. // This is very similar to parse_body, but here the userids must contain // a domain, not be equal to an email address. @@ -337,7 +335,6 @@ pub fn generate<S, T, P>(domain: S, tpks: &[TPK], base_path: P, if let Some(address) = uidb.userid().address()? { let wkd_url = Url::from(&address)?; if wkd_url.domain == domain { - found_a_key = true; // Since dir_path contains all the hierarchy, only the file // name is needed. let file_path = dir_path.join(wkd_url.local_encoded); @@ -346,16 +343,10 @@ pub fn generate<S, T, P>(domain: S, tpks: &[TPK], base_path: P, file.metadata()?.permissions().set_mode(0o644); tpk.serialize(&mut tpk_bytes)?; file.write_all(&tpk_bytes)?; - println!("Key {} published for {} in {}", - tpk.fingerprint().to_string(), address, - file_path.as_path().to_str().unwrap()); } } } } - if !found_a_key { - println!("No keys found for the domain."); - } Ok(()) } |