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.

drh 2013-02-15 14:52 trunk
Commit b5aab69514e9092065582c1bf6ea522074a03ba5
1 file changed +2 -2
--- src/http_transport.c
+++ src/http_transport.c
@@ -312,11 +312,11 @@
312312
sqlite3_randomness(sizeof(iRandId), &iRandId);
313313
transport.zOutFile = mprintf("%s-%llu-out.http",
314314
g.zRepositoryName, iRandId);
315315
transport.zInFile = mprintf("%s-%llu-in.http",
316316
g.zRepositoryName, iRandId);
317
- transport.pFile = fopen(transport.zOutFile, "wb");
317
+ transport.pFile = fossil_fopen(transport.zOutFile, "wb");
318318
if( transport.pFile==0 ){
319319
fossil_fatal("cannot output temporary file: %s", transport.zOutFile);
320320
}
321321
transport.isOpen = 1;
322322
}else{
@@ -409,11 +409,11 @@
409409
zCmd = mprintf("\"%s\" http \"%s\" \"%s\" \"%s\" 127.0.0.1 --localauth",
410410
g.nameOfExe, g.urlName, transport.zOutFile, transport.zInFile
411411
);
412412
fossil_system(zCmd);
413413
free(zCmd);
414
- transport.pFile = fopen(transport.zInFile, "rb");
414
+ transport.pFile = fossil_fopen(transport.zInFile, "rb");
415415
}
416416
}
417417
418418
/*
419419
** Log all input to a file. The transport layer will take responsibility
420420
--- 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

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button