The problem with osis2mod is that createModule does not like a path that does 
not already exist.

I was thinking that FileMgr should be used to test and create the directory if 
needed. I saw that there was an FileMgr::isDirectory(path) and that there was a 
FileMgr::createParent(path). The latter takes a path ending in / or \ and 
recursively will test and create the directory.

I can add these to osis2mod, but it seems that the proper location is in the 
createModule methods. Is there a reason that we require the caller of osis2mod 
(and the other *2mod) to ensure that the directory exists? It appears that on 
Windows that osis2mod crashes if the directory does not exist. It at least 
should exit gracefully.

In Him,
        DM

On Jul 16, 2013, at 8:32 AM, DM Smith <dmsm...@crosswire.org> wrote:

> Yes we should test directory existence. 
> 
> In Him,
> DM 
> 
> On Jul 16, 2013, at 6:46 AM, Marjan Savli <marjan.sa...@gmail.com> wrote:
> 
>> Hello, 
>> 
>> after few days more I find simple solution for  osis2mod crash
>>    (osis2mod.exe sword\modules\texts\ztext\kjva_sloeng\ 
>> kjv_slo_osis_sword.xml -v KJVA -z)
>> 
>> I needed to create subdirectiories which I accidentally deleted days ago. So 
>> I included in my script these lines.
>> 
>> ====
>> d:
>> chdir d:\
>> mkdir \temp\sword\sword\modules\texts\ztext\kjva_sloeng
>> mkdir \temp\sword\sword\modules\texts\ztext\kjva_slo
>> =====
>> 
>> And question:
>> Is this hard to implement into osis2mod.exe, that instead of crash report 
>> that directory is missing?
>> 
>> 
>>        ------------   Marjan   ----------
>>         tel:    +386 (0)4 5121 377
>>        --------------------------------------
>> 
>> 
>> 2013/7/12 Marjan Savli <marjan.sa...@gmail.com>
>> Hello
>> 
>> I tried to use osis2mod to convert a OSISBible format text to SWORD modules, 
>> but I got error message: osis2mod.exe has encountered a problem and needs to 
>> close. 
>> I am using Windows XP SP3, osis2mod 2671. I tried also on Windows 7, but it 
>> was the same. First I tried with different tried msvcr100.dll, but it was 
>> the same. At last I decided, that this is probably my fault in .xml file.
>> 
>> But two month ago this conversion was done without any problems. But then 
>> something happens. :-))
>> 
>> This is my .bat file:
>> 
>> C:\Temp\sword>osis2mod.exe sword\modules\texts\ztext\kjva_sloeng\ 
>> kjv_slo_osis_sword.xml -v KJVA -z
>> You are running osis2mod: $Rev: 2671 $
>> 
>> Here ( https://sites.google.com/site/marjansavli/ ) is my 
>>    - picture of crash       osis2mod_crash.JPG   (147k)
>>    - osis XML file   kjv_slo_osis_sword.zip     (476k)
>>    - working 2 sword modules from two months ago     kjva_slo_sword.zip  
>> (3629k)
>> 
>> 
>> I read also this thread 
>> http://sword-dev.350566.n4.nabble.com/Using-osis2mod-td356887.html
>> And I made extract from my xml file and here are all my osisID tags
>> 
>> osisID="1Cor
>> osisID="1Cor.c
>> osisID="1John
>> osisID="1Pet
>> osisID="1Thess
>> osisID="1Thess.c
>> osisID="1Tim
>> osisID="1Tim.c
>> osisID="2Cor
>> osisID="2Cor.c
>> osisID="2John
>> osisID="2Pet
>> osisID="2Pet 
>> osisID="2Thess
>> osisID="2Thess.c
>> osisID="2Tim
>> osisID="2Tim.c
>> osisID="3John
>> osisID="Acts
>> osisID="Col
>> osisID="Col.c
>> osisID="Eph
>> osisID="Eph.c
>> osisID="Gal
>> osisID="Gal.c
>> osisID="Heb
>> osisID="Heb.c
>> osisID="Jas
>> osisID="John
>> osisID="Jude
>> osisID="Luke
>> osisID="Luke 
>> osisID="Mark
>> osisID="Matt
>> osisID="Phil
>> osisID="Phil.c
>> osisID="Phlm
>> osisID="Phlm.c
>> osisID="Ps
>> osisID="Rev
>> osisID="Rev 
>> osisID="Rom
>> osisID="Rom.c
>> osisID="Titus
>> osisID="Titus 
>> osisID="Titus.c
>> 
>> 
>> If anyone can help me I would be thankful.
>> 
>>        ------------   Marjan   ----------
>>         tel:    +386 (0)4 5121 377
>>        --------------------------------------
>> 
>> _______________________________________________
>> sword-devel mailing list: sword-devel@crosswire.org
>> http://www.crosswire.org/mailman/listinfo/sword-devel
>> Instructions to unsubscribe/change your settings at above page
> _______________________________________________
> sword-devel mailing list: sword-devel@crosswire.org
> http://www.crosswire.org/mailman/listinfo/sword-devel
> Instructions to unsubscribe/change your settings at above page

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
sword-devel mailing list: sword-devel@crosswire.org
http://www.crosswire.org/mailman/listinfo/sword-devel
Instructions to unsubscribe/change your settings at above page

Reply via email to