From d6d35bf47e5b5b4b7b99a4abb020b8fd73e6c13c Mon Sep 17 00:00:00 2001 From: Chester Liu Date: Tue, 20 Apr 2021 17:47:58 +0800 Subject: [PATCH] Hide _ prefix files --- src/fs/dir.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/fs/dir.rs b/src/fs/dir.rs index 7f7b067..1c9fb90 100644 --- a/src/fs/dir.rs +++ b/src/fs/dir.rs @@ -111,6 +111,13 @@ impl<'dir, 'ig> Files<'dir, 'ig> { 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 { let git_status = self.git.map(|g| g.get(path, false)).unwrap_or_default(); if git_status.unstaged == GitStatus::Ignored {