diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | src/update_check.c | 7 |
2 files changed, 7 insertions, 4 deletions
@@ -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 */ |