Skip to content

Commit

Permalink
fix: fix issue hidden path handling
Browse files Browse the repository at this point in the history
  • Loading branch information
macrat committed Jan 26, 2024
1 parent 1891ccd commit 191f271
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions builder/fs/fs.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ var ErrNotExist = fs.ErrNotExist

var WalkDir = fs.WalkDir

var SkipDir = fs.SkipDir

type DirEntry = fs.DirEntry

type File = fs.File
Expand Down
6 changes: 4 additions & 2 deletions builder/source.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package main

import (
"io"
"path"
"time"

"github.com/macrat/blanktar/builder/fs"
Expand Down Expand Up @@ -72,7 +71,10 @@ func WalkSources(f fs.Readable, fn WalkSourcesFunc) error {
if err != nil {
return err
}
if !d.IsDir() && path.Base(name)[0] != '.' {
if d.IsDir() && d.Name()[0] == '.' {
return fs.SkipDir
}
if !d.IsDir() && d.Name()[0] != '.' {
fn(Source{name, f})
}
return nil
Expand Down

0 comments on commit 191f271

Please sign in to comment.