Fossil SCM
Fix the file: sync protocol so that it works on windows even if the client repository is in a directory that contains non-ASCII characters in its name.
Commit
b5aab69514e9092065582c1bf6ea522074a03ba5
Parent
6267e24b39dc2b9…
1 file changed
+2
-2
+2
-2
| --- src/http_transport.c | ||
| +++ src/http_transport.c | ||
| @@ -312,11 +312,11 @@ | ||
| 312 | 312 | sqlite3_randomness(sizeof(iRandId), &iRandId); |
| 313 | 313 | transport.zOutFile = mprintf("%s-%llu-out.http", |
| 314 | 314 | g.zRepositoryName, iRandId); |
| 315 | 315 | transport.zInFile = mprintf("%s-%llu-in.http", |
| 316 | 316 | g.zRepositoryName, iRandId); |
| 317 | - transport.pFile = fopen(transport.zOutFile, "wb"); | |
| 317 | + transport.pFile = fossil_fopen(transport.zOutFile, "wb"); | |
| 318 | 318 | if( transport.pFile==0 ){ |
| 319 | 319 | fossil_fatal("cannot output temporary file: %s", transport.zOutFile); |
| 320 | 320 | } |
| 321 | 321 | transport.isOpen = 1; |
| 322 | 322 | }else{ |
| @@ -409,11 +409,11 @@ | ||
| 409 | 409 | zCmd = mprintf("\"%s\" http \"%s\" \"%s\" \"%s\" 127.0.0.1 --localauth", |
| 410 | 410 | g.nameOfExe, g.urlName, transport.zOutFile, transport.zInFile |
| 411 | 411 | ); |
| 412 | 412 | fossil_system(zCmd); |
| 413 | 413 | free(zCmd); |
| 414 | - transport.pFile = fopen(transport.zInFile, "rb"); | |
| 414 | + transport.pFile = fossil_fopen(transport.zInFile, "rb"); | |
| 415 | 415 | } |
| 416 | 416 | } |
| 417 | 417 | |
| 418 | 418 | /* |
| 419 | 419 | ** Log all input to a file. The transport layer will take responsibility |
| 420 | 420 |
| --- src/http_transport.c | |
| +++ src/http_transport.c | |
| @@ -312,11 +312,11 @@ | |
| 312 | sqlite3_randomness(sizeof(iRandId), &iRandId); |
| 313 | transport.zOutFile = mprintf("%s-%llu-out.http", |
| 314 | g.zRepositoryName, iRandId); |
| 315 | transport.zInFile = mprintf("%s-%llu-in.http", |
| 316 | g.zRepositoryName, iRandId); |
| 317 | transport.pFile = fopen(transport.zOutFile, "wb"); |
| 318 | if( transport.pFile==0 ){ |
| 319 | fossil_fatal("cannot output temporary file: %s", transport.zOutFile); |
| 320 | } |
| 321 | transport.isOpen = 1; |
| 322 | }else{ |
| @@ -409,11 +409,11 @@ | |
| 409 | zCmd = mprintf("\"%s\" http \"%s\" \"%s\" \"%s\" 127.0.0.1 --localauth", |
| 410 | g.nameOfExe, g.urlName, transport.zOutFile, transport.zInFile |
| 411 | ); |
| 412 | fossil_system(zCmd); |
| 413 | free(zCmd); |
| 414 | transport.pFile = fopen(transport.zInFile, "rb"); |
| 415 | } |
| 416 | } |
| 417 | |
| 418 | /* |
| 419 | ** Log all input to a file. The transport layer will take responsibility |
| 420 |
| --- src/http_transport.c | |
| +++ src/http_transport.c | |
| @@ -312,11 +312,11 @@ | |
| 312 | sqlite3_randomness(sizeof(iRandId), &iRandId); |
| 313 | transport.zOutFile = mprintf("%s-%llu-out.http", |
| 314 | g.zRepositoryName, iRandId); |
| 315 | transport.zInFile = mprintf("%s-%llu-in.http", |
| 316 | g.zRepositoryName, iRandId); |
| 317 | transport.pFile = fossil_fopen(transport.zOutFile, "wb"); |
| 318 | if( transport.pFile==0 ){ |
| 319 | fossil_fatal("cannot output temporary file: %s", transport.zOutFile); |
| 320 | } |
| 321 | transport.isOpen = 1; |
| 322 | }else{ |
| @@ -409,11 +409,11 @@ | |
| 409 | zCmd = mprintf("\"%s\" http \"%s\" \"%s\" \"%s\" 127.0.0.1 --localauth", |
| 410 | g.nameOfExe, g.urlName, transport.zOutFile, transport.zInFile |
| 411 | ); |
| 412 | fossil_system(zCmd); |
| 413 | free(zCmd); |
| 414 | transport.pFile = fossil_fopen(transport.zInFile, "rb"); |
| 415 | } |
| 416 | } |
| 417 | |
| 418 | /* |
| 419 | ** Log all input to a file. The transport layer will take responsibility |
| 420 |