[SQLiteJDBC] A problem with the read-only detection of the database
Tommi Vainikainen
Tommi.Vainikainen at conformiq.com
Fri Dec 18 07:45:50 EST 2009
Hi,
currently if one opens SQLite database with SQLiteJDBC and asks with
method isReadOnly() if the database is writable, it fails to return
correct answer in such case where the database file itself has
writable-bit set, but the containing directory is read-only. This is
because SQLite creates temporary journal file to the directory.
To fix this, I suggest that in src/org/sqlite/Conn.java nearby line 64
also file's getParentFile()'s canWrite() is called to check if the the
directory containing the database is also writable.
--
Tommi Vainikainen
http://www.conformiq.com/ - Automated Test Design
More information about the SQLiteJDBC
mailing list