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

DM Smith dmsmith at crosswire.org
Thu Nov 22 16:47:59 MST 2012


Looks wrong to me. 

Cent from my fone so theer mite be tipos. ;)

On Nov 22, 2012, at 6:05 PM, Chris Burrell <chris at burrell.me.uk> wrote:

> 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?
> Chris
> 
> _______________________________________________
> 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