[jsword-devel] Front end conf override dir creation

DM Smith dmsmith at crosswire.org
Sat Jan 2 12:00:11 MST 2016


Just pushed a change to MetaDataLocator to create the folders if they don’t exist.
— DM

> On Jan 2, 2016, at 12:41 PM, DM Smith <dmsmith at crosswire.org> wrote:
> 
> 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
> 
> 
> _______________________________________________
> 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