summaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2012-09-18 10:07:02 +0200
committerSebastien Helleu <flashcode@flashtux.org>2012-09-18 10:07:02 +0200
commitb5f7c124ea73d480b76ee3e339237c12a0ebcaf4 (patch)
treec906b76a0239c41cc18aadcf09e0a3c52bd5f93c /src/plugins
parent9070cc5659e212adbf4fb336db37f358c99c810f (diff)
downloadweechat-b5f7c124ea73d480b76ee3e339237c12a0ebcaf4.zip
script: consider that empty file "plugins.xml.gz" is not up-to-date
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/script/script-repo.c7
1 files changed, 7 insertions, 0 deletions
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)
{