aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2011-06-24 09:40:31 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2011-06-24 09:40:31 +0000
commit048b760a626dfe3e863a2f266c84aefceaeaf851 (patch)
tree507fbdb5567dd5167a5d14bbd1c74f96fcde6893
parentaa0b97813b605a3000b0afa715b0151f99ccb7a1 (diff)
src/update_check.c: win32: also check the file size of updater exe.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@2913 ee746299-78ed-0310-b773-934348b2243d
-rw-r--r--ChangeLog4
-rw-r--r--src/update_check.c7
2 files changed, 7 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 13c69a22..6344f9bf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
2011-06-24
+ * src/update_check.c: win32: also check the file size of updater exe.
+
+2011-06-24
+
* src/summaryview.c: summary_colorlabel_menu_item_activate_item_cb():
removed alloca().
* libsylph/utils.c: my_tmpfile(): win32: fixed a memory leak.
diff --git a/src/update_check.c b/src/update_check.c
index ab5cd4ae..b1797c6c 100644
--- a/src/update_check.c
+++ b/src/update_check.c
@@ -143,7 +143,7 @@ static gboolean spawn_update_manager(void)
gboolean ret = FALSE;
src = g_strconcat(get_startup_dir(), G_DIR_SEPARATOR_S, "update-manager.exe", NULL);
- if (!is_file_exist(src)) {
+ if (!is_file_exist(src) || get_file_size(src) <= 0) {
g_warning("update-manager.exe not found.");
goto finish;
}
@@ -185,13 +185,13 @@ void update_check_spawn_plugin_updater(void)
gboolean ret = FALSE;
if (!plugin_updater_ini)
- return ret;
+ return;
if (!is_file_exist(plugin_updater_ini)) {
g_warning("Not found %s", plugin_updater_ini);
goto finish;
}
exe = g_strconcat(get_startup_dir(), G_DIR_SEPARATOR_S, "plugin-updater.exe", NULL);
- if (!is_file_exist(exe)) {
+ if (!is_file_exist(exe) || get_file_size(exe) <= 0) {
g_warning("Not found plugin-updater.exe");
goto finish;
}
@@ -218,7 +218,6 @@ finish:
g_free(quoted_ini);
g_free(plugin_updater_ini);
plugin_updater_ini = NULL;
- return ret;
}
#endif /* USE_UPDATE_CHECK_PLUGIN */
#endif /* G_OS_WIN32 */