Bug: IsHiddenPath(".") returns true, incorrectly treating current directory as hidden #14
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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.