collection is not updated if the md5 file size of collection is 0
If the md5 file in collection has size 0, delete it. Set $local_collection_md5 to "Size 0", which is impossible for md5, and let $remote_collection_md5 be adopted.
This commit is contained in:
parent
eaae19ab41
commit
195e3cdd3f
|
@ -2403,6 +2403,11 @@ sub check_collections () {
|
|||
if (open (MD5_FILE, "< $ConfDir/collections/$collection_md5_file")) {
|
||||
$local_collection_md5 = <MD5_FILE>;
|
||||
close MD5_FILE;
|
||||
if ( ! defined ($local_collection_md5) ) {
|
||||
log_message ('Collection', "Size of $ConfDir/collections/$collection_md5_file is 0");
|
||||
unlink ("$ConfDir/collections/$collection_md5_file");
|
||||
$local_collection_md5 = "Size 0";
|
||||
}
|
||||
} else {
|
||||
log_message ('Collection', "Could not open dir $ConfDir/collections/$collection_md5_file");
|
||||
next;
|
||||
|
|
Loading…
Reference in New Issue