From 195e3cdd3f7e840dd5e3ea6d1b0a15ed44a6305a Mon Sep 17 00:00:00 2001 From: Shinichi Matsumoto Date: Tue, 22 Nov 2022 03:59:01 +0000 Subject: [PATCH] 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. --- pandora_agents/unix/pandora_agent | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index 1c91f31f38..a4d71094e8 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -2403,6 +2403,11 @@ sub check_collections () { if (open (MD5_FILE, "< $ConfDir/collections/$collection_md5_file")) { $local_collection_md5 = ; 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;