diff options
author | Přemysl Janouch <p.janouch@gmail.com> | 2011-02-13 21:14:24 +0100 |
---|---|---|
committer | Přemysl Janouch <p.janouch@gmail.com> | 2011-02-13 21:14:24 +0100 |
commit | 0841e75076a98feecd2da1d48e2a2f340512feca (patch) | |
tree | 691599fd7a4316ecc6e3e533d7674c2e229ca208 | |
parent | bc491d0d0fd431d38c6ba13de9369f80ddc261b3 (diff) | |
download | logdiag-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.
-rw-r--r-- | src/logdiag.c | 10 |
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, ""); |