[sword-devel] Bug in handling the DataPath of a config file

Troy A. Griffitts scribe at crosswire.org
Sun Jan 31 14:42:27 MST 2010


Hey Eeli,

A few quick comments:


Eeli Kaikkonen wrote:
> We have basically the following code in BibleTime:
> 
> sword::SWConfig conf(file);
> moduleInstallationDirs << conf["Install"]["DataPath"];

conf["Install"]["DataPath"]

should return "" if no entry exists.  SWConfig is only an ini reading 
facility and has no logic about current directories or anything else.

Also, as far as I know, SWORD has always required a 'primary' DataPath 
and allows additional AugmentPaths.  I don't believe a sword.conf file 
will be used by the engine if there is no DataPath entry.

Hope this helps,

Troy






> 
> But it has a problem: if there's no DataPath in the conf file, the
> current working directory is returned. It has worked correctly in the
> past, but nowadays it's buggy. This happens in Kubuntu Linux where I use
> the latest 1.6.1 sword package from the crosswire PPA. I don't remember
> when the bug appeared.
> 
>   Yours,
> 	Eeli Kaikkonen (Mr.), Oulu, Finland
> 	e-mail: eekaikko at mailx.studentx.oulux.fix (with no x)
> 
> _______________________________________________
> sword-devel mailing list: sword-devel at crosswire.org
> http://www.crosswire.org/mailman/listinfo/sword-devel
> Instructions to unsubscribe/change your settings at above page




More information about the sword-devel mailing list