Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Fix temp file handling for OS/2 so that trailing slashes or backslashes are stripped off the path gotten from the environment. Otherwise full paths might contain multiple slashes which causes opening of files to fail. (CVS 4406) |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
96aa96ac11ab63b51e4322e88ded4f93 |
User & Date: | pweilbacher 2007-09-05 22:28:23.000 |
Context
2007-09-06
| ||
07:47 | Add some extra comments to the header in test_async.c. (CVS 4407) (check-in: 79cf4e886c user: danielk1977 tags: trunk) | |
2007-09-05
| ||
22:28 | Fix temp file handling for OS/2 so that trailing slashes or backslashes are stripped off the path gotten from the environment. Otherwise full paths might contain multiple slashes which causes opening of files to fail. (CVS 4406) (check-in: 96aa96ac11 user: pweilbacher tags: trunk) | |
17:06 | Fix a harmless typo in the PRNG initialization on win32. Ticket #2617. (CVS 4405) (check-in: ea1d76e3fa user: drh tags: trunk) | |
Changes
Changes to src/os_os2.c.
︙ | ︙ | |||
234 235 236 237 238 239 240 241 242 243 244 245 246 247 | if( DosScanEnv( (PSZ)"TMPDIR", &zTempPath ) ){ ULONG ulDriveNum = 0, ulDriveMap = 0; DosQueryCurrentDisk( &ulDriveNum, &ulDriveMap ); sprintf( (char*)zTempPath, "%c:", (char)( 'A' + ulDriveNum - 1 ) ); } } } for(;;){ sprintf( zBuf, "%s\\"TEMP_FILE_PREFIX, zTempPath ); j = strlen( zBuf ); sqlite3Randomness( 15, &zBuf[j] ); for( i = 0; i < 15; i++, j++ ){ zBuf[j] = (char)zChars[ ((unsigned char)zBuf[j])%(sizeof(zChars)-1) ]; } | > > > > > > > | 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 | if( DosScanEnv( (PSZ)"TMPDIR", &zTempPath ) ){ ULONG ulDriveNum = 0, ulDriveMap = 0; DosQueryCurrentDisk( &ulDriveNum, &ulDriveMap ); sprintf( (char*)zTempPath, "%c:", (char)( 'A' + ulDriveNum - 1 ) ); } } } /* strip off a trailing slashes or backslashes, otherwise we would get * * multiple (back)slashes which causes DosOpen() to fail */ j = strlen(zTempPath); while( j > 0 && zTempPath[j-1] == '\\' || zTempPath[j-1] == '/' ){ j--; } zTempPath[j] = '\0'; for(;;){ sprintf( zBuf, "%s\\"TEMP_FILE_PREFIX, zTempPath ); j = strlen( zBuf ); sqlite3Randomness( 15, &zBuf[j] ); for( i = 0; i < 15; i++, j++ ){ zBuf[j] = (char)zChars[ ((unsigned char)zBuf[j])%(sizeof(zChars)-1) ]; } |
︙ | ︙ |