1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-12 13:01:09 +03:00

Fix an issue with finding the access permissions of journal files when

8+3 filenames are in use.

FossilOrigin-Name: 2b35c5144ddcc2ed6d0fcaa8c0ba5d20b9487be7
This commit is contained in:
drh
2011-10-20 18:23:35 +00:00
parent 60bdeb2aa9
commit d337c5bde8
3 changed files with 10 additions and 10 deletions

View File

@@ -4874,13 +4874,13 @@ static int findCreateFileMode(
** "<path to db>-journalNN"
** "<path to db>-walNN"
**
** where NN is a 4 digit decimal number. The NN naming schemes are
** where NN is a decimal number. The NN naming schemes are
** used by the test_multiplex.c module.
*/
nDb = sqlite3Strlen30(zPath) - 1;
#ifdef SQLITE_ENABLE_8_3_NAMES
while( nDb>0 && zPath[nDb]!='-' && zPath[nDb]!='/' ) nDb--;
if( nDb==0 || zPath[nDb]=='/' ) return SQLITE_OK;
while( nDb>0 && !sqlite3Isalnum(zPath[nDb]) ) nDb--;
if( nDb==0 || zPath[nDb]!='-' ) return SQLITE_OK;
#else
while( zPath[nDb]!='-' ){
assert( nDb>0 );