Opened 12 years ago
Closed 12 years ago
#1222 closed Defect (fixed)
dont_verify_images ignored at client startup
Reported by: | Juha | Owned by: | davea |
---|---|---|---|
Priority: | Minor | Milestone: | Undetermined |
Component: | Client - Daemon | Version: | 7.0.42 |
Keywords: | Cc: |
Description
At startup the client checks that all the files it tracks exist and their size is correct. The check for file size includes image files even if the user has selected "Skip image file verification". If the user's ISP is compressing image files this will cause images to be re-downloaded every time BOINC is restarted.
Fix (also separates "not found" and "wrong size" cases for better log messages):
diff --git a/client/cs_files.cpp b/client/cs_files.cpp index b28afd8..52331fa 100644 --- a/client/cs_files.cpp +++ b/client/cs_files.cpp @@ -469,10 +469,17 @@ void CLIENT_STATE::check_file_existence() { get_pathname(fip, path, sizeof(path)); double size; int retval = file_size(path, size); - if (retval || (fip->nbytes && (size != fip->nbytes))) { + if (retval) { delete_project_owned_file(path, true); fip->status = FILE_NOT_PRESENT; - msg_printf(NULL, MSG_INFO, "file %s not found", path); + msg_printf(NULL, MSG_INFO, "File %s not found", path); + } else if (fip->nbytes && (size != fip->nbytes)) { + if (gstate.global_prefs.dont_verify_images && is_image_file(path)) continue; + delete_project_owned_file(path, true); + fip->status = FILE_NOT_PRESENT; + msg_printf(NULL, MSG_INFO, + "File %s has wrong size: expected %.0f, got %.0f", + path, fip->nbytes, size); } } }