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

Fix the fix to the temporary directory search algorithm so that it continues

to return "." as a fallback if that directory has the correct permissions.

FossilOrigin-Name: b38fe522cfc971b37ca04e7b63a92bbb6e0b01e1
This commit is contained in:
drh
2016-04-23 20:59:23 +00:00
parent 7694e06461
commit 23ee893752
3 changed files with 8 additions and 8 deletions

View File

@@ -5416,7 +5416,7 @@ static const char *unixTempFileDir(void){
if( !azDirs[0] ) azDirs[0] = getenv("SQLITE_TMPDIR");
if( !azDirs[1] ) azDirs[1] = getenv("TMPDIR");
for(i=0; i<sizeof(azDirs)/sizeof(azDirs[0]); zDir=azDirs[i++]){
for(i=0; i<=sizeof(azDirs)/sizeof(azDirs[0]); zDir=azDirs[i++]){
if( zDir==0 ) continue;
if( osStat(zDir, &buf) ) continue;
if( !S_ISDIR(buf.st_mode) ) continue;