/ Check-in [9b8fec60]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Merge the temporary directory search algorithm fix from trunk.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | tempfiles-25
Files: files | file ages | folders
SHA1: 9b8fec60d8e576cd09e1d075a59bfad1c6169d7a
User & Date: drh 2016-04-23 21:16:55
References
2016-04-29
20:30
Fix the temporary directory search algorithm for unix so that it fails gracefully even if all candidate directories are inaccessible. This fixes a bug that was introduced by check-in [9b8fec60d8e]. check-in: 614bb709 user: drh tags: trunk
Context
2016-04-25
15:03
Merge bug fix from trunk. check-in: a905d5e0 user: drh tags: tempfiles-25
2016-04-23
21:16
Merge the temporary directory search algorithm fix from trunk. check-in: 9b8fec60 user: drh tags: tempfiles-25
20:59
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. check-in: b38fe522 user: drh tags: trunk
19:55
Merge the latest trunk changes. check-in: 84da122d user: drh tags: tempfiles-25
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/os_unix.c.

  5412   5412     };
  5413   5413     unsigned int i;
  5414   5414     struct stat buf;
  5415   5415     const char *zDir = sqlite3_temp_directory;
  5416   5416   
  5417   5417     if( !azDirs[0] ) azDirs[0] = getenv("SQLITE_TMPDIR");
  5418   5418     if( !azDirs[1] ) azDirs[1] = getenv("TMPDIR");
  5419         -  for(i=0; i<sizeof(azDirs)/sizeof(azDirs[0]); zDir=azDirs[i++]){
         5419  +  for(i=0; i<=sizeof(azDirs)/sizeof(azDirs[0]); zDir=azDirs[i++]){
  5420   5420       if( zDir==0 ) continue;
  5421   5421       if( osStat(zDir, &buf) ) continue;
  5422   5422       if( !S_ISDIR(buf.st_mode) ) continue;
  5423   5423       if( osAccess(zDir, 03) ) continue;
  5424   5424       return zDir;
  5425   5425     }
  5426   5426     return 0;