(fi protocol.FileInfo)
| 192 | } |
| 193 | |
| 194 | func (q *deleteQueue) handle(fi protocol.FileInfo) (bool, error) { |
| 195 | // Things that are ignored but not marked deletable are not processed. |
| 196 | ign := q.ignores.Match(fi.Name) |
| 197 | if ign.IsIgnored() && !ign.IsDeletable() { |
| 198 | return false, nil |
| 199 | } |
| 200 | |
| 201 | // Directories are queued for later processing. |
| 202 | if fi.IsDirectory() { |
| 203 | q.dirs = append(q.dirs, fi.Name) |
| 204 | return false, nil |
| 205 | } |
| 206 | |
| 207 | // Kill it. |
| 208 | err := q.handler.deleteItemOnDisk(fi, q.scanChan) |
| 209 | return true, err |
| 210 | } |
| 211 | |
| 212 | func (q *deleteQueue) flush() ([]string, error) { |
| 213 | // Process directories from the leaves inward. |
no test coverage detected