SQLite

View Ticket
Login
Ticket Hash: 5e0423b058fa5adf8756391a04b047230d03fba0
Title: xAccess behaviour is not documented, changed in Windows 3.7.0
Status: Fixed Type: Documentation
Severity: Important Priority: Immediate
Subsystem: VFS Resolution: Fixed
Last Modified: 2019-06-10 19:07:23
Version Found In: 3.7.0
Description:
The documentation doesn't really define what xAccess should do, in particular when should it return False versus returning an error.
http://sqlite.org/c3ref/vfs.html

Under Unix you cannot have invalid filenames, except with some specialised non-default file systems. However Windows does have quite a few restrictions. For example it doesn't permit double quotes, angle brackets, asterisk, question mark etc in file names. (Note that colon is permitted to name an alternate data stream.)

In my testing I use a filename of "<bad<filename:" and then call xAccess. Prior to SQLite 3.7.0 the Windows VFS would return False. With 3.7.0 it now returns SQLITE_IOERR with the helpful error text of "error".


rogerb added on 2010-07-22 06:11:59:
The Windows VFS also definitely appears to contradict the limited description in the documentation. In particular calling xAccess with a filename of "." (ie currently directory) and a flag of SQLITE_ACCESS_EXISTS returns False. It used to return True prior to SQLite 3.7.0.