I have discovered that module unzipping is a little fussy about the zips.  The current JSword code does not cope with directory entries in the zip file.<div><br></div><div>Some times when I zip up a module the zip includes directory entries which make the zip unpacking fail (at least on Android) with the following stack trace:<br>
<div><br></div><div>09-29 21:53:11.555: INFO/System.out(29460): *** uri:file:/mnt/sdcard/Android/data/net.bible.android.activity/files/modules/</div><div><div>09-29 21:53:11.565: WARN/System.err(29460): java.io.FileNotFoundException: /mnt/sdcard/Android/data/net.bible.android.activity/files/modules (Is a directory)</div>
<div>09-29 21:53:11.565: WARN/System.err(29460):     at org.apache.harmony.luni.platform.OSFileSystem.open(Native Method)</div><div>09-29 21:53:11.565: WARN/System.err(29460):     at dalvik.system.BlockGuard$WrappedFileSystem.open(BlockGuard.java:232)</div>
<div>09-29 21:53:11.565: WARN/System.err(29460):     at java.io.FileOutputStream.<init>(FileOutputStream.java:94)</div><div>09-29 21:53:11.565: WARN/System.err(29460):     at java.io.FileOutputStream.<init>(FileOutputStream.java:165)</div>
<div>09-29 21:53:11.565: WARN/System.err(29460):     at org.crosswire.common.util.NetUtil.getOutputStream(NetUtil.java:455)</div><div>09-29 21:53:11.565: WARN/System.err(29460):     at org.crosswire.common.util.NetUtil.getOutputStream(NetUtil.java:435)</div>
<div>09-29 21:53:11.565: WARN/System.err(29460):     at org.crosswire.common.util.IOUtil.unpackZip(IOUtil.java:84)</div><div>09-29 21:53:11.565: WARN/System.err(29460):     at org.crosswire.jsword.book.install.sword.AbstractSwordInstaller$1.run(AbstractSwordInstaller.java:258)</div>
</div><div><br></div></div><div>I wonder if others have experienced this.</div><div><br></div><div>I recall having a lot of problems with some of the zips from the Xiphos repo, but no problems with zips on the CrossWire repo and I wonder if this could be the cause.</div>
<div><br></div><div>I have created an ant task to generate the module zip and noticed that I needed the 'filesonly="true"' flag on the zip task without which unzipping failed.</div><div><div><span class="Apple-tab-span" style="white-space:pre">              </span><zip destfile="${distribution.dir}/${module.zipfile}" filesonly="true"></div>
</div><div><br></div><div>I wondered if anybody else had encountered this before.</div><div><br></div><div>Martin</div>