()
| 78 | } |
| 79 | |
| 80 | func (d *downstream) populateFileMap() error { |
| 81 | d.sync.fileIndex.fileMapMutex.Lock() |
| 82 | defer d.sync.fileIndex.fileMapMutex.Unlock() |
| 83 | |
| 84 | changes, err := d.collectChanges(true) |
| 85 | if err != nil { |
| 86 | return errors.Wrap(err, "collect changes") |
| 87 | } |
| 88 | |
| 89 | for _, element := range changes { |
| 90 | if d.sync.fileIndex.fileMap[element.Path] == nil { |
| 91 | d.sync.fileIndex.fileMap[element.Path] = parseFileInformation(element) |
| 92 | } |
| 93 | } |
| 94 | |
| 95 | return nil |
| 96 | } |
| 97 | |
| 98 | func (d *downstream) collectChanges(skipIgnore bool) ([]*remote.Change, error) { |
| 99 | d.sync.log.Debugf("Downstream - Start collecting changes") |
no test coverage detected