aboutsummaryrefslogtreecommitdiff
path: root/src/os_unix.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2016-04-23 20:59:23 +0000
committerdrh <drh@noemail.net>2016-04-23 20:59:23 +0000
commit23ee89375284ba23b42d81c4ce3a39d656b0996d (patch)
tree7704bc353e41f4de0d376c0f2faa676992c250b1 /src/os_unix.c
parent7694e06461203a466865fc8ed3068e0990a7ca50 (diff)
downloadsqlite-23ee89375284ba23b42d81c4ce3a39d656b0996d.tar.gz
sqlite-23ee89375284ba23b42d81c4ce3a39d656b0996d.zip
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
Diffstat (limited to 'src/os_unix.c')
-rw-r--r--src/os_unix.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/os_unix.c b/src/os_unix.c
index 9a97515fd..aadb414af 100644
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -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;