path.Clean(".") returns ".", which starts with a dot, so IsHiddenPath(".") returns true. The current directory . is not a hidden path — it is the root of the scan.
The same bug exists in internal/scanner/scanner.go in the pathIsHidden() function.
This could cause issues if the walker passes "." as a path argument, as it would be incorrectly filtered out. While afero.Walk typically passes "/" for the root, other callers or edge cases could trigger this.
Fix: Explicitly exclude . (and ./) from being considered hidden.
In `mfer/scanner.go`, `IsHiddenPath()` starts by checking:
```go
tp := path.Clean(p)
if strings.HasPrefix(tp, ".") {
return true
}
```
`path.Clean(".")` returns `"."`, which starts with a dot, so `IsHiddenPath(".")` returns `true`. The current directory `.` is not a hidden path — it is the root of the scan.
The same bug exists in `internal/scanner/scanner.go` in the `pathIsHidden()` function.
This could cause issues if the walker passes `"."` as a path argument, as it would be incorrectly filtered out. While `afero.Walk` typically passes `"/"` for the root, other callers or edge cases could trigger this.
**Fix:** Explicitly exclude `.` (and `./`) from being considered hidden.
clawbot
self-assigned this 2026-02-08 21:01:32 +01:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
In
mfer/scanner.go,IsHiddenPath()starts by checking:path.Clean(".")returns".", which starts with a dot, soIsHiddenPath(".")returnstrue. The current directory.is not a hidden path — it is the root of the scan.The same bug exists in
internal/scanner/scanner.goin thepathIsHidden()function.This could cause issues if the walker passes
"."as a path argument, as it would be incorrectly filtered out. Whileafero.Walktypically passes"/"for the root, other callers or edge cases could trigger this.Fix: Explicitly exclude
.(and./) from being considered hidden.