Hide _ prefix files

This commit is contained in:
Chester Liu 2021-04-20 17:47:58 +08:00
parent 777cd7e815
commit d6d35bf47e

View File

@ -111,6 +111,13 @@ impl<'dir, 'ig> Files<'dir, 'ig> {
continue; continue;
} }
// Also hide _prefix files on Windows because it's used by old applications
// as an alternative to dot-prefix files.
#[cfg(windows)]
if ! self.dotfiles && filename.starts_with('_') {
continue;
}
if self.git_ignoring { if self.git_ignoring {
let git_status = self.git.map(|g| g.get(path, false)).unwrap_or_default(); let git_status = self.git.map(|g| g.get(path, false)).unwrap_or_default();
if git_status.unstaged == GitStatus::Ignored { if git_status.unstaged == GitStatus::Ignored {