(subDirs []string)
| 1230 | } |
| 1231 | |
| 1232 | func (f *folder) clearScanErrors(subDirs []string) { |
| 1233 | f.errorsMut.Lock() |
| 1234 | defer f.errorsMut.Unlock() |
| 1235 | if len(subDirs) == 0 { |
| 1236 | f.scanErrors = nil |
| 1237 | return |
| 1238 | } |
| 1239 | filtered := f.scanErrors[:0] |
| 1240 | outer: |
| 1241 | for _, fe := range f.scanErrors { |
| 1242 | for _, sub := range subDirs { |
| 1243 | if fe.Path == sub || fs.IsParent(fe.Path, sub) { |
| 1244 | continue outer |
| 1245 | } |
| 1246 | } |
| 1247 | filtered = append(filtered, fe) |
| 1248 | } |
| 1249 | f.scanErrors = filtered |
| 1250 | } |
| 1251 | |
| 1252 | func (f *folder) Errors() []FileError { |
| 1253 | f.errorsMut.Lock() |
no test coverage detected