[Geany-Devel] Setting Windows working directory

Enrico Tröger enrico.troeger at xxxxx
Wed Mar 13 06:01:11 UTC 2013


> We have had a report on IRC that running geany on the windows command
> line will only open files in the Geany install directory unless you
> use the full path.
> eg C:\somepath> geany somefile.txt
> will open installpath\somefile.txt not somepath\somefile.txt.
> And with the "Open new documents from the command line" option set it
> creates somefile.txt in the install dir since it doesn't exist there.

Dammit, I broke this with the mentioned commit. After you said it, it is
totally obvious.
Well that change was a workaround at all but now we need another
workaround. The problem is that some code, I don't remember exactly
whether it were only plugins or also Geany code, read resource files
from a relative path like "\data\foo.bar". For this to work, the working
directory must be set correctly. The reason for the mentioned change was
this in some plugin, so I've moved the code to change the working
directory to perform it earlier in the init process, before loading plugins.
For a quick'n'dirty fix we could either move the working directory
change code move after command line parsing code but before plugin
loading or we remember the working directory at early stage to use this
when llater handling command line arguments.
Both are not nice and the real solution is to get rid of relative paths
for resources in the installation directory.
I'm going to work on this.

> As the most experienced windowser (and the committer of that change)
> could you look at it please?

most experienced windowser?
Really not. Using Windows once or twice a year, depending of the amount
of Geany releases :).


Get my GPG key from http://www.uvena.de/pub.asc

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: OpenPGP digital signature
URL: <http://lists.geany.org/pipermail/devel/attachments/20130313/cc9455d8/attachment.pgp>

More information about the Devel mailing list