Fix pathIsHidden treating base directory as hidden, print banner to stdout

- pathIsHidden(".") was returning true, causing freshen to skip entire
  directory tree when dotfiles excluded
- Banner now prints directly to stdout to avoid log prefix artifacts
This commit is contained in:
2025-12-17 15:20:56 -08:00
parent 5523cb1595
commit 818358a8a1
3 changed files with 11 additions and 10 deletions

View File

@@ -372,12 +372,11 @@ func addExistingToBuilder(b *mfer.Builder, entry *mfer.MFFilePath) {
// pathIsHidden checks if a path contains hidden components
func pathIsHidden(p string) bool {
for _, part := range filepath.SplitList(p) {
if len(part) > 0 && part[0] == '.' {
return true
}
// "." is not hidden, it's the current directory
if p == "." {
return false
}
// Also check each path component
// Check each path component
for p != "" && p != "." && p != "/" {
base := filepath.Base(p)
if len(base) > 0 && base[0] == '.' {