mirror of
https://github.com/lcdr/lu_packets.git
synced 2025-12-30 09:00:38 -06:00
change main parse call to use .extension (#1)
* change main parse call to use .extension Using ends_with on arch linux (tried on both arco and manjaro distros) doesn't recognize that the path ends with .zip. But using this (as done above as an extra check in the parse function) works. * check if it's a file and not a dir first since you cannot unwrap a none, which the extension from a dir is none
This commit is contained in:
@@ -220,7 +220,7 @@ fn main() {
|
||||
unsafe { PRINT_PACKETS = args.get(3).is_some(); }
|
||||
|
||||
let start = Instant::now();
|
||||
let packet_count = if capture.ends_with(".zip") {
|
||||
let packet_count = if !capture.is_dir() && capture.extension().unwrap() == "zip" {
|
||||
parse(&capture, &mut cdclient)
|
||||
} else {
|
||||
visit_dirs(&capture, &mut cdclient, 0)
|
||||
|
||||
Reference in New Issue
Block a user