[jsword-devel] Curious to understand if this is correct

Chris Burrell chris at burrell.me.uk
Thu Nov 22 16:05:38 MST 2012

Hi All

In the RawBackendState, or what used to be the RawBackend, we have the
following method, which looks wrong to me:

    public boolean isWritable() {
        // For the module to be writable either the old testament or the new
        // testament needs to be present
        // (i.e. readable) and both the index and the data files need to be
        // writable
        if (otIdxFile.canRead() && (otIdxFile.canWrite() ||
!otTextFile.canWrite())) {
            return false;
        if (ntIdxFile.canRead() && (ntIdxFile.canWrite() ||
!ntTextFile.canWrite())) {
            return false;
        return otIdxFile.canRead() || ntIdxFile.canRead();

We are saying that if we can read the idx file and can write the idx file,
then the module is not writable. ?!? Perhaps that's a mistake I ported
over, or something pre-existing, or something I introduced, but it doesn't
look right to me!

Any thoughts?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.crosswire.org/pipermail/jsword-devel/attachments/20121122/05d2c3fd/attachment.html>

More information about the jsword-devel mailing list