Skip to content

Commit

Permalink
fix issue #2047
Browse files Browse the repository at this point in the history
  • Loading branch information
gqcn committed Aug 15, 2022
1 parent 43b84f4 commit 349707b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion debug/gdebug/gdebug_caller.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,11 @@ func filterFileByFilters(file string, filters []string) (filtered bool) {
}
// GOROOT filter.
if goRootForFilter != "" && len(file) >= len(goRootForFilter) && file[0:len(goRootForFilter)] == goRootForFilter {
return true
// https://github.com/gogf/gf/issues/2047
fileSeparator := file[len(goRootForFilter)]
if fileSeparator == filepath.Separator || fileSeparator == '\\' || fileSeparator == '/' {
return true
}
}
return false
}
Expand Down

0 comments on commit 349707b

Please sign in to comment.