diff options
Diffstat (limited to 'src/flags.rs')
-rw-r--r-- | src/flags.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/flags.rs b/src/flags.rs index 0a10b7f..848b158 100644 --- a/src/flags.rs +++ b/src/flags.rs @@ -74,7 +74,8 @@ impl Flags { }; let recursive = matches.is_present("recursive"); - let recursion_depth = match matches.value_of("depth") { + let recursion_input = matches.values_of("depth").and_then(|values| values.last()); + let recursion_depth = match recursion_input { Some(str) if recursive || layout == Layout::Tree => match str.parse::<usize>() { Ok(val) => val, Err(_) => { |