SQLite

Check-in [4f7e7b44f2]
Login

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

Overview
Comment:Remove unreachable branches from the 8.3 filename logic.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 4f7e7b44f2d17681318a1fd22466d3cc03103fc4
User & Date: drh 2011-05-18 02:41:10.584
Context
2011-05-18
03:02
Make sure the multiplexor shim uses a full pathname for temp file that it creates. (check-in: 186d7ff1d9 user: drh tags: trunk)
02:41
Remove unreachable branches from the 8.3 filename logic. (check-in: 4f7e7b44f2 user: drh tags: trunk)
02:22
Update multiplex VFS to handle empty filenames which can occur for during vacuuming (temp file names.) (check-in: a074986045 user: shaneh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/util.c.
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
*/
void sqlite3FileSuffix3(const char *zBaseFilename, char *z){
  const char *zOk;
  zOk = sqlite3_uri_parameter(zBaseFilename, "8_3_names");
  if( zOk && sqlite3GetBoolean(zOk) ){
    int i, sz;
    sz = sqlite3Strlen30(z);
    for(i=sz-1; i>0 && z[i]!='/' && z[i]!='\\' && z[i]!='.'; i--){}
    if( z[i]=='.' && sz>i+4 ) memcpy(&z[i+1], &z[sz-3], 4);
  }
}
#endif







|
|



1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
*/
void sqlite3FileSuffix3(const char *zBaseFilename, char *z){
  const char *zOk;
  zOk = sqlite3_uri_parameter(zBaseFilename, "8_3_names");
  if( zOk && sqlite3GetBoolean(zOk) ){
    int i, sz;
    sz = sqlite3Strlen30(z);
    for(i=sz-1; i>0 && z[i]!='/' && z[i]!='.'; i--){}
    if( z[i]=='.' && ALWAYS(sz>i+4) ) memcpy(&z[i+1], &z[sz-3], 4);
  }
}
#endif