[jsword-devel] Front end conf override dir creation

DM Smith dmsmith at crosswire.org
Sat Jan 2 10:41:19 MST 2016


See below:

> On Dec 31, 2015, at 11:41 AM, Martin Denham <mjdenham at gmail.com> wrote:
> 
> Before recent changes I had to do:
> 
> CommonUtils.ensureDirExists(new File(SharedConstants.FRONTEND_DATA_DIR, SwordConstants.DIR_CONF_OVERRIDE));

// Assuming that you have done this.
CWProject.instance().setFrontendName("jsword-app”); // Or whatever you like.

This should be:
CommonUtils.ensureDirExists(MetaDataLocator.FRONTEND.getWriteLocation());
or
MetaDataLocator.FRONTEND.getWriteLocation().mkdirs();

> 
> to ensure the front end data dir and conf override directories existed.  Otherwise errors occurred.
> 
> However, the public SwordConstants.DIR_CONF_OVERRIDE has been changed to a private MetaDataLocator.DIR_CONF_OVERRIDE which And Bible cannot access.
> 
> What is the intended approach to front end override directory creation in JSword or does JSword assume the directories are created by the Front end?

The intention is that the frontend does not have to create the directories. It should be created by JSword. That is how MetaDataLocator was commented.

So, BookMetaData.putProperty should try to create the folders and files. It should log an error if they can’t be created, but not throw an IOException.

> _______________________________________________
> jsword-devel mailing list
> jsword-devel at crosswire.org
> http://www.crosswire.org/mailman/listinfo/jsword-devel




More information about the jsword-devel mailing list