Check for missing files using .sfv file
Bug #316427 reported by
scorch
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
DC++ |
Confirmed
|
Wishlist
|
Unassigned |
Bug Description
Feature request.
When hashing data, DC++ notifies if CRC32 values from .sfv files doesn't match the actual files themselves. It would be nice if DC++ could also notify about missing files. I.e. files specified in the .sfv file that doesn't exists in that directory.
Changed in dcplusplus: | |
importance: | Undecided → Wishlist |
To post a comment you must log in.
Patch that should work. I haven't tried it yet though.
The patch adds an if clause in dcpp/HashManage r.cpp on line 769, right before the CRC32 inconsistency check. It tries to open the file; if it can, close the handle and continue, otherwise write to the log that it couldn't find the file (will also say so if the permissions are wrong, but then it wouldn't be shared anyway...).
Code follows:
FILE* fp = NULL; :getInstance( )->message( str(F_( "%1% not found but found in SFV file.") % fname));
fp = fopen(fname, "rb");
if(fp == NULL) {
LogManager:
} else {
fclose(fp);
}