diff options
author | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2005-11-17 10:45:25 +0000 |
---|---|---|
committer | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2005-11-17 10:45:25 +0000 |
commit | 68b99ea2d3cf42fffe216aeef3be97cf6bbf0de4 (patch) | |
tree | 24261eaaecb0b62f67cded366cd22a301cda9db4 /libsylph/utils.c | |
parent | a22f18f518f55b22df7ddc8daa3896e7fe730750 (diff) |
win32: fixed startup directory. add sylpheed-mailto-protocol.reg to EXTRA_DIST.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@760 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'libsylph/utils.c')
-rw-r--r-- | libsylph/utils.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/libsylph/utils.c b/libsylph/utils.c index 0cb484f0..2d441163 100644 --- a/libsylph/utils.c +++ b/libsylph/utils.c @@ -1685,8 +1685,23 @@ static gchar *rc_dir = NULL; void set_startup_dir(void) { +#ifdef G_OS_WIN32 + if (!startup_dir) { + startup_dir = g_win32_get_package_installation_directory + (NULL, NULL); + if (startup_dir) { + if (g_chdir(startup_dir) < 0) { + FILE_OP_ERROR(startup_dir, "chdir"); + g_free(startup_dir); + startup_dir = g_get_current_dir(); + } + } else + startup_dir = g_get_current_dir(); + } +#else if (!startup_dir) startup_dir = g_get_current_dir(); +#endif } void set_rc_dir(const gchar *dir) |