aboutsummaryrefslogtreecommitdiff
path: root/src/update_check.c
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 /src/update_check.c
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
Diffstat (limited to 'src/update_check.c')
-rw-r--r--src/update_check.c7
1 files changed, 3 insertions, 4 deletions
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 */