all: Fix check for empty string (#8456)
Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
This commit is contained in:
co-authored by
deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
parent
a2c5d901f2
commit
80ec4acb53
@@ -748,12 +748,12 @@ func TestStopWalk(t *testing.T) {
|
||||
f := res.File
|
||||
t.Log("Scanned", f)
|
||||
if f.IsDirectory() {
|
||||
if len(f.Name) == 0 || f.Permissions == 0 {
|
||||
if f.Name == "" || f.Permissions == 0 {
|
||||
t.Error("Bad directory entry", f)
|
||||
}
|
||||
dirs++
|
||||
} else {
|
||||
if len(f.Name) == 0 || len(f.Blocks) == 0 || f.Permissions == 0 {
|
||||
if f.Name == "" || len(f.Blocks) == 0 || f.Permissions == 0 {
|
||||
t.Error("Bad file entry", f)
|
||||
}
|
||||
files++
|
||||
|
||||
Reference in New Issue
Block a user