deleteFile attempts to delete the given file
(file protocol.FileInfo, dbUpdateChan chan<- dbUpdateJob, scanChan chan<- string)
| 856 | |
| 857 | // deleteFile attempts to delete the given file |
| 858 | func (f *sendReceiveFolder) deleteFile(file protocol.FileInfo, dbUpdateChan chan<- dbUpdateJob, scanChan chan<- string) { |
| 859 | cur, hasCur, err := f.model.sdb.GetDeviceFile(f.folderID, protocol.LocalDeviceID, file.Name) |
| 860 | if err != nil { |
| 861 | f.newPullError(file.Name, fmt.Errorf("delete file: %w", err)) |
| 862 | return |
| 863 | } |
| 864 | f.deleteFileWithCurrent(file, cur, hasCur, dbUpdateChan, scanChan) |
| 865 | } |
| 866 | |
| 867 | func (f *sendReceiveFolder) deleteFileWithCurrent(file, cur protocol.FileInfo, hasCur bool, dbUpdateChan chan<- dbUpdateJob, scanChan chan<- string) { |
| 868 | // Used in the defer closure below, updated by the function body. Take |
no test coverage detected