/ Check-in [ed11abc8]
Login

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

Overview
Comment:Remove extra \ characters from temporary filenames under windows. (Ticket #52) (CVS 596)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: ed11abc81e638c21ec1aa0445a6d59de91343095
User & Date: drh 2002-05-29 12:44:53
Context
2002-05-29
23:22
Built-in aggregate functions (MIN, SUM, AVG, etc) should ignore NULL entires. (CVS 597) check-in: 19ae12be user: drh tags: trunk
12:44
Remove extra \ characters from temporary filenames under windows. (Ticket #52) (CVS 596) check-in: ed11abc8 user: drh tags: trunk
2002-05-28
06:55
Update trigger2.test to match checkin 591. Also fix ticket #51 (by documenting problem) (CVS 595) check-in: 5e74d096 user: danielk1977 tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/os.c.

   431    431     static char zChars[] =
   432    432       "abcdefghijklmnopqrstuvwxyz"
   433    433       "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
   434    434       "0123456789";
   435    435     int i, j;
   436    436     char zTempPath[SQLITE_TEMPNAME_SIZE];
   437    437     GetTempPath(SQLITE_TEMPNAME_SIZE-30, zTempPath);
          438  +  for(i=strlen(zTempPath); i>0 && zTempPath[i-1]=='\\'; i--){}
          439  +  zTempPath[i] = 0;
   438    440     for(;;){
   439         -    sprintf(zBuf, "%s/sqlite_", zTempPath);
          441  +    sprintf(zBuf, "%s\\sqlite_", zTempPath);
   440    442       j = strlen(zBuf);
   441    443       for(i=0; i<15; i++){
   442    444         int n = sqliteRandomByte() % sizeof(zChars);
   443    445         zBuf[j++] = zChars[n];
   444    446       }
   445    447       zBuf[j] = 0;
   446    448       if( !sqliteOsFileExists(zBuf) ) break;