From 8f444056099876aa36382824e637ad2084dc9c4c Mon Sep 17 00:00:00 2001 From: hiro Date: Thu, 6 Oct 2005 06:46:56 +0000 Subject: win32: include startup directory into %PATH% for GSpawn. git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@623 ee746299-78ed-0310-b773-934348b2243d --- src/main.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c index 27f6b460..8537686e 100644 --- a/src/main.c +++ b/src/main.c @@ -367,10 +367,21 @@ static gint get_queued_message_num(void) static void app_init(void) { +#ifdef G_OS_WIN32 + gchar *newpath; +#endif + + setlocale(LC_ALL, ""); + prog_version = PROG_VERSION; startup_dir = g_get_current_dir(); - setlocale(LC_ALL, ""); +#ifdef G_OS_WIN32 + /* include startup directory into %PATH% for GSpawn */ + newpath = g_strconcat(startup_dir, ";", g_getenv("PATH"), NULL); + g_setenv("PATH", newpath, TRUE); + g_free(newpath); +#endif if (g_path_is_absolute(LOCALEDIR)) bindtextdomain(PACKAGE, LOCALEDIR); -- cgit v1.2.3