/ Check-in [328cc186]
Login
SQLite training in Houston TX on 2019-11-05 (details)
Part of the 2019 Tcl Conference

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

Overview
Comment:When finding the appropriate file permissions for journal files with SQLITE_ENABLE_8_3_NAMES, ignore "-" characters in the name of the containing directory.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 328cc1867ffbbf1c953dfd843649f5f209c8e6ec
User & Date: drh 2011-10-05 15:26:13
Context
2011-10-05
17:36
Fix test code related to reporting the size of overflow pages in zipvfs databases. check-in: ad7c9eed user: dan tags: trunk
15:26
When finding the appropriate file permissions for journal files with SQLITE_ENABLE_8_3_NAMES, ignore "-" characters in the name of the containing directory. check-in: 328cc186 user: drh tags: trunk
2011-10-03
15:30
Merge the STAT3 changes into trunk. check-in: 774d0842 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Show Whitespace Changes Patch

Changes to src/os_unix.c.

  4884   4884       **   "<path to db>-journalNN"
  4885   4885       **   "<path to db>-walNN"
  4886   4886       **
  4887   4887       ** where NN is a 4 digit decimal number. The NN naming schemes are 
  4888   4888       ** used by the test_multiplex.c module.
  4889   4889       */
  4890   4890       nDb = sqlite3Strlen30(zPath) - 1; 
  4891         -    while( nDb>0 && zPath[nDb]!='-' ) nDb--;
  4892         -    if( nDb==0 ) return SQLITE_OK;
         4891  +#ifdef SQLITE_ENABLE_8_3_NAMES
         4892  +    while( nDb>0 && zPath[nDb]!='-' && zPath[nDb]!='/' ) nDb--;
         4893  +    if( nDb==0 || zPath[nDb]=='/' ) return SQLITE_OK;
         4894  +#else
         4895  +    while( zPath[nDb]!='-' ){
         4896  +      assert( nDb>0 );
         4897  +      assert( zPath[nDb]!='\n' );
         4898  +      nDb--;
         4899  +    }
         4900  +#endif
  4893   4901       memcpy(zDb, zPath, nDb);
  4894   4902       zDb[nDb] = '\0';
  4895   4903   
  4896   4904       if( 0==osStat(zDb, &sStat) ){
  4897   4905         *pMode = sStat.st_mode & 0777;
  4898   4906       }else{
  4899   4907         rc = SQLITE_IOERR_FSTAT;