From b5f7c124ea73d480b76ee3e339237c12a0ebcaf4 Mon Sep 17 00:00:00 2001 From: Sebastien Helleu Date: Tue, 18 Sep 2012 10:07:02 +0200 Subject: [PATCH] script: consider that empty file "plugins.xml.gz" is not up-to-date --- src/plugins/script/script-repo.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/plugins/script/script-repo.c b/src/plugins/script/script-repo.c index 6ea49b1f3..3039ab2b5 100644 --- a/src/plugins/script/script-repo.c +++ b/src/plugins/script/script-repo.c @@ -1038,6 +1038,13 @@ script_repo_file_is_uptodate () return 0; } + /* file is empty? => NOT up-to-date */ + if (st.st_size == 0) + { + free (filename); + return 0; + } + /* cache never expires? => OK, up-to-date! */ if (cache_expire < 0) {