1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-08 14:02:16 +03:00

Remove extra \ characters from temporary filenames under windows.

(Ticket #52) (CVS 596)

FossilOrigin-Name: ed11abc81e638c21ec1aa0445a6d59de91343095
This commit is contained in:
drh
2002-05-29 12:44:52 +00:00
parent 993b173e55
commit f1756d2a79
3 changed files with 11 additions and 9 deletions

View File

@@ -435,8 +435,10 @@ int sqliteOsTempFileName(char *zBuf){
int i, j;
char zTempPath[SQLITE_TEMPNAME_SIZE];
GetTempPath(SQLITE_TEMPNAME_SIZE-30, zTempPath);
for(i=strlen(zTempPath); i>0 && zTempPath[i-1]=='\\'; i--){}
zTempPath[i] = 0;
for(;;){
sprintf(zBuf, "%s/sqlite_", zTempPath);
sprintf(zBuf, "%s\\sqlite_", zTempPath);
j = strlen(zBuf);
for(i=0; i<15; i++){
int n = sqliteRandomByte() % sizeof(zChars);