Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions internal/cli/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -239,8 +239,16 @@ func processStream(ctx context.Context, parsed *ParsedArgs) error {
}

if !stat.IsDir() {
fsys = os.DirFS(filepath.Dir(absPath))
walkRoot = filepath.Base(absPath)
if filepath.IsAbs(rawPath) {
// Fallback for absolute paths
fsys = os.DirFS(filepath.Dir(absPath))
walkRoot = filepath.Base(absPath)
} else {
// Anchor relative files to the current directory
// so the walker evaluates the full path against filters
fsys = os.DirFS(".")
walkRoot = filepath.ToSlash(filepath.Clean(rawPath))
}
} else {
fsys = os.DirFS(absPath)
walkRoot = "."
Expand Down
Loading