From 0841e75076a98feecd2da1d48e2a2f340512feca Mon Sep 17 00:00:00 2001
From: Přemysl Janouch
Date: Sun, 13 Feb 2011 21:14:24 +0100
Subject: Change the current directory on Windows.
So the application can always find it's files.
---
src/logdiag.c | 10 ++++++++++
1 file changed, 10 insertions(+)
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, "");
--
cgit v1.2.3-70-g09d2