mirror of
https://github.com/ralsina/tartrazine.git
synced 2025-06-18 22:23:07 -03:00
make IsDotFile do not treat '.' as true
Signed-off-by: Huitse Tai <geb.1989@gmail.com>
This commit is contained in:
3
utils.go
3
utils.go
@ -40,7 +40,8 @@ func IsConfiguration(path string) bool {
|
||||
|
||||
// IsDotFile returns whether or not path has dot as a prefix.
|
||||
func IsDotFile(path string) bool {
|
||||
return strings.HasPrefix(filepath.Base(path), ".")
|
||||
base := filepath.Base(path)
|
||||
return strings.HasPrefix(base, ".") && len(base) > len(".")
|
||||
}
|
||||
|
||||
// IsVendor returns whether or not path is a vendor path.
|
||||
|
Reference in New Issue
Block a user