diff options
Diffstat (limited to 'src/os_unix.c')
-rw-r--r-- | src/os_unix.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/os_unix.c b/src/os_unix.c index 95f20bad9..0a1c3e741 100644 --- a/src/os_unix.c +++ b/src/os_unix.c @@ -4233,7 +4233,7 @@ static const char *unixTempFileDir(int allowShm){ if( allowShm ){ zDir = "/dev/shm"; - i = 0; + i = 2; /* Skip the app-defined temp locations for shared-memory */ }else{ zDir = azDirs[0]; i = 1; @@ -4242,7 +4242,7 @@ static const char *unixTempFileDir(int allowShm){ if( zDir==0 ) continue; if( stat(zDir, &buf) ) continue; if( !S_ISDIR(buf.st_mode) ) continue; - if( access(zDir, 07) ) continue; + if( !allowShm && access(zDir, 07) ) continue; break; } return zDir; |