Closed
Description
Reported by Juha on 1 Sep 43014132 00:33 UTC
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);
}
}
}
Activity