Change the working directory on Windows properly
commite1ce9cfbecf432f8033ecf15322c2b273d377c34
authorEnrico Tröger <enrico.troeger@uvena.de>
Thu, 10 Apr 2014 20:24:15 +0000 (10 22:24 +0200)
committerEnrico Tröger <enrico.troeger@uvena.de>
Thu, 10 Apr 2014 20:24:15 +0000 (10 22:24 +0200)
tree625daa1117062ae5efd3c4d702d2d4ffb2115ad2
parent9ea8b9d11afa2ecc17775ef3ddd347a3a823457c
Change the working directory on Windows properly

On Windows we need to change the working directory on startup to not
lock the directory Geany was started from (bug #2626124).
However we can't change the directory to late in the startup process
otherwise plugins maybe unable to load resources from the installation
directory.

Though we also can't change it too early otherwise opening files given
with relative paths in Geany from the command line won't work anymore
(bug #3613096).

This change should fix both issues by changing the working directory after
command line file handling happened and before plugins will be loaded.
src/main.c