diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2019-12-20 11:44:51 +0100 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2019-12-20 18:04:56 +0100 |
commit | a6c0f21dc6023492bc7122465e11dc935e622ac6 (patch) | |
tree | 3196bb316a334677ab9138b51618a30db4780c0f /tool/src/commands/mod.rs | |
parent | db3d4cb1dd9251118418ced1a2d1690d0b6b344f (diff) |
sq: When splitting packets, add Unkown if we don't understand them.
Diffstat (limited to 'tool/src/commands/mod.rs')
-rw-r--r-- | tool/src/commands/mod.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tool/src/commands/mod.rs b/tool/src/commands/mod.rs index 1e136572..b4ea9037 100644 --- a/tool/src/commands/mod.rs +++ b/tool/src/commands/mod.rs @@ -422,9 +422,10 @@ pub fn split(input: &mut dyn io::Read, prefix: &str) while let PacketParserResult::Some(pp) = ppr { if let Some(ref map) = pp.map() { let filename = format!( - "{}{}--{:?}", prefix, + "{}{}--{}{:?}", prefix, pos.iter().map(|n| format!("{}", n)) .collect::<Vec<String>>().join("-"), + pp.packet.kind().map(|_| "").unwrap_or("Unknown-"), pp.packet.tag()); let mut sink = File::create(filename) .context("Failed to create output file")?; |