- /* TODO: no assuming here. the calling function should tell us what's kosher */
- if(!force && stat(destfile, &st) == 0) {
- /* assume its a sync, so we're starting from scratch. but, only download
- * our local is out of date. */
+ if(!force && stat(destfile, &st) == 0 && !allow_resume) {
+ /* start from scratch, but only download our local is out of date. */
curl_easy_setopt(handle->curl, CURLOPT_TIMECONDITION, CURL_TIMECOND_IFMODSINCE);
curl_easy_setopt(handle->curl, CURLOPT_TIMEVALUE, (long)st.st_mtime);
} else if(stat(tempfile, &st) == 0 && allow_resume) {
--
1.7.5.2