> I just run into a bug. Don't have the time to look into it now, but I
> guess it has got something to do with config and backslashes.
> I open the database's preferences page, and set this as a log file:
> But, when I "save" and reopen the dialog, one backslash is gone.
I looks like all strings read/written by config() are affected. I think
I found the reason. I tracked it down to wxConfig. Here's a snippet from
manual that explains it:
-------------- quote ---------------
Some aspects of wxConfigBase behaviour can be changed during run-time.
The first of them is the expansion of environment variables in the
string values read from the config file: for example, if you have the
following in your config file:
# config file for my program
UserData = $HOME/data
# the following syntax is valud only under Windows
UserData = %windir%\\data.dat
the call to config->Read("UserData") will return something like
"/home/zeitlin/data" if you're lucky enough to run a Linux system ;-)
Although this feature is very useful, it may be annoying if you read a
value which containts '$' or '%' symbols (% is used for environment
variables expansion under Windows) which are not used for environment
---------- end quote ---------------
Nando, are you relying on env.var. expansion for something? If not, I
think it would be best to disable it completely by calling
SetExpandEnvVars(false) in config's constructor.
I committed that to CVS, but if you do need it for something, feel free
to remove the fix and we'll find some other way (escaping \% with
additional backslash comes to mind).