Saves current chunks' statuses into a resume file.
| 186 | |
| 187 | // Saves current chunks' statuses into a resume file. |
| 188 | void SaveResumeChunks() |
| 189 | { |
| 190 | try |
| 191 | { |
| 192 | // Flush writer before saving downloaded chunks. |
| 193 | m_writer->Flush(); |
| 194 | |
| 195 | m_strategy.SaveChunks(m_progress.m_bytesTotal, m_filePath + RESUME_FILE_EXTENSION); |
| 196 | } |
| 197 | catch (Writer::Exception const & e) |
| 198 | { |
| 199 | LOG(LWARNING, ("Can't flush writer", e.Msg())); |
| 200 | } |
| 201 | } |
| 202 | |
| 203 | /// Called for each chunk by one main (GUI) thread. |
| 204 | virtual void OnFinish(long httpOrErrorCode, int64_t begRange, int64_t endRange) |
nothing calls this directly
no test coverage detected