Просмотр исходного кода

fix: take -a and -A equally serious

sbatial 2 лет назад
Родитель
Сommit
78e4384f0c
1 измененных файлов с 3 добавлено и 3 удалено
  1. 3 3
      src/options/filter.rs

+ 3 - 3
src/options/filter.rs

@@ -167,9 +167,9 @@ impl DotFilter {
             (0, false) => Ok(Self::JustFiles),
 
             // either a single --all or at least one --almost-all is given
-            (1, _) | (_, true) => Ok(Self::Dotfiles),
-            // more than one --all (and no --almost-all)
-            (c, false) => if matches.count(&flags::TREE) > 0 {
+            (1, _) | (0, true) => Ok(Self::Dotfiles),
+            // more than one --all
+            (c, _) => if matches.count(&flags::TREE) > 0 {
                 Err(OptionsError::TreeAllAll)
             } else if matches.is_strict() && c > 2 {
                 Err(OptionsError::Conflict(&flags::ALL, &flags::ALL))