Deduplicate parsed sensitivity paths correctly
This commit is contained in:
@@ -210,7 +210,7 @@ func (model *historyModel) sensitivityCandidates() []historySensitivityCandidate
|
||||
}
|
||||
pointer := path.String()
|
||||
for _, index := range indices[pointer] {
|
||||
if sameConcreteHistoryPath(candidates[index].path, path) {
|
||||
if slices.Equal(candidates[index].path.segments, path.segments) {
|
||||
candidates[index].sensitive = candidates[index].sensitive || sensitive
|
||||
candidates[index].classify = candidates[index].classify || classify
|
||||
return index
|
||||
@@ -254,7 +254,7 @@ func (model *historyModel) sensitivityCandidates() []historySensitivityCandidate
|
||||
|
||||
func appendDistinctHistoryPath(paths *[]Path, path Path) {
|
||||
for _, existing := range *paths {
|
||||
if sameConcreteHistoryPath(existing, path) {
|
||||
if slices.Equal(existing.segments, path.segments) {
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user