From 9729135288d04b4616dae5a3bc530cd9b9968d7d Mon Sep 17 00:00:00 2001 From: hiro Date: Fri, 5 Nov 2010 07:58:56 +0000 Subject: fixes restart of process on Win32 when installed on non-ascii path. git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@2712 ee746299-78ed-0310-b773-934348b2243d --- ChangeLog | 6 ++++++ src/main.c | 6 ++++-- src/update_check.c | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index d48080a7..127a55ee 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2010-11-05 + + * src/main.c + src/update_check.c: convert argv[0] to UTF-8 (fixes restart of + process on Win32 when installed on non-ascii path). + 2010-11-02 * libsylph/sylmain.c diff --git a/src/main.c b/src/main.c index 8d3a01e6..61553050 100644 --- a/src/main.c +++ b/src/main.c @@ -133,7 +133,7 @@ static struct RemoteCmd { gboolean configdir; gboolean exit; gboolean restart; - const gchar *argv0; + gchar *argv0; #ifdef G_OS_WIN32 gushort ipcport; #endif @@ -618,7 +618,9 @@ static void parse_cmd_opt(int argc, char *argv[]) cmd.compose_mailto = NULL; } - cmd.argv0 = argv[0]; + cmd.argv0 = g_locale_to_utf8(argv[0], -1, NULL, NULL, NULL); + if (!cmd.argv0) + cmd.argv0 = g_strdup(argv[0]); } static gint get_queued_message_num(void) diff --git a/src/update_check.c b/src/update_check.c index 44f931ca..2582cd91 100644 --- a/src/update_check.c +++ b/src/update_check.c @@ -144,7 +144,7 @@ static gboolean spawn_update_manager(void) src = g_strconcat(get_startup_dir(), G_DIR_SEPARATOR_S, "update-manager.exe", NULL); if (!is_file_exist(src)) { - g_warning("Not found update-manager.exe"); + g_warning("update-manager.exe not found."); goto finish; } dest = g_strconcat(g_get_tmp_dir(), G_DIR_SEPARATOR_S, "sylpheed-update-manager.exe", NULL); -- cgit v1.2.3