Skip to content
Myr

changed executable=> executable_only

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Pramod Bisht · committed by David Peter · parent b1e48ef · Browse files · 3 files+8 added−4 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

3 files+8 added−4 removed

  • other:+8 added−4 removed

3 files+8 added−4 removed

modified:src/internal.rs+2 added-2 removed
20 unmodified lines
21pub struct FileTypes {22 pub files: bool,23 pub directories: bool,24 pub symlinks: bool,25 pub executables: bool,25 pub executables_only: bool,26}2728impl Default for FileTypes {29 fn default() -> FileTypes {30 FileTypes {31 files: false,32 directories: false,33 symlinks: false,34 executables: false,34 executables_only: false,35 }36 }37}38
215 unmodified lines
modified:src/main.rs+4 added-1 removed
159 unmodified lines
160 match value {161 "f" | "file" => file_types.files = true,162 "d" | "directory" => file_types.directories = true,163 "l" | "symlink" => file_types.symlinks = true,164 "x" | "executable" => file_types.executables = true,164 "x" | "executable" => {165 file_types.executables_only = true;166 file_types.files = true;167 },168 _ => unreachable!(),169 }170 }171 file_types
34 unmodified lines
modified:src/walk.rs+2 added-1 removed
194 unmodified lines
195 return ignore::WalkState::Continue;196 }197198 // Filter out unwanted file types.199200 if let Some(ref file_types) = config.file_types {201 if let Some(ref entry_type) = entry.file_type() {202 if (entry_type.is_file() && !file_types.files)203 || (entry_type.is_dir() && !file_types.directories)204 || (entry_type.is_symlink() && !file_types.symlinks)204 || (output::is_executable(&entry.metadata().unwrap()) && !file_types.executables)205 || (entry.metadata().is_ok() && !output::is_executable(&entry.metadata().unwrap()) && file_types.executables_only)206 {207 return ignore::WalkState::Continue;208 } else if !(entry_type.is_file() || entry_type.is_dir()209 || entry_type.is_symlink())
53 unmodified lines