aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2011-02-13 21:14:24 +0100
committerPřemysl Janouch <p.janouch@gmail.com>2011-02-13 21:14:24 +0100
commit0841e75076a98feecd2da1d48e2a2f340512feca (patch)
tree691599fd7a4316ecc6e3e533d7674c2e229ca208 /src
parentbc491d0d0fd431d38c6ba13de9369f80ddc261b3 (diff)
downloadlogdiag-0841e75076a98feecd2da1d48e2a2f340512feca.tar.gz
logdiag-0841e75076a98feecd2da1d48e2a2f340512feca.tar.xz
logdiag-0841e75076a98feecd2da1d48e2a2f340512feca.zip
Change the current directory on Windows.
So the application can always find it's files.
Diffstat (limited to 'src')
-rw-r--r--src/logdiag.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/logdiag.c b/src/logdiag.c
index a7821e7..99aa8de 100644
--- a/src/logdiag.c
+++ b/src/logdiag.c
@@ -21,6 +21,16 @@ main (int argc, char *argv[])
{
GtkWidget *window;
GError *error;
+#ifdef _WIN32
+ gchar *install_dir;
+
+ install_dir = g_win32_get_package_installation_directory_of_module (NULL);
+ if (install_dir)
+ {
+ g_chdir (install_dir);
+ g_free (install_dir);
+ }
+#endif
setlocale (LC_ALL, "");