Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | Use a standard .txt extension for temporary files and avoid double dots in file name. |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | amend-regress |
| Files: | files | file ages | folders |
| SHA3-256: |
51058ce141f083060dc2ae373ff62bfc |
| User & Date: | andybradford 2017-05-29 17:02:24.112 |
Context
|
2017-06-02
| ||
| 02:23 | Restore the ability to amend a comment both with and without an interactive editor. If the edit happens outside a working check-out then use a suitable TMP directory. check-in: 1fff403a68 user: andybradford tags: trunk | |
|
2017-05-29
| ||
| 17:02 | Use a standard .txt extension for temporary files and avoid double dots in file name. Closed-Leaf check-in: 51058ce141 user: andybradford tags: amend-regress | |
|
2017-05-26
| ||
| 05:55 | Remove the restriction entirely for editing a comment only in the working check-out directory and choose an appropriate temporary file if no working check-out is available instead. check-in: 74df777e34 user: andybradford tags: amend-regress | |
Changes
Changes to src/checkin.c.
| ︙ | ︙ | |||
1206 1207 1208 1209 1210 1211 1212 |
blob_zero(&fname);
if( g.zLocalRoot!=0 ){
file_relative_name(g.zLocalRoot, &fname, 1);
zFile = db_text(0, "SELECT '%qci-comment-'||hex(randomblob(6))||'.txt'",
blob_str(&fname));
}else{
file_tempname(&fname, "ci-comment");
| | | 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 |
blob_zero(&fname);
if( g.zLocalRoot!=0 ){
file_relative_name(g.zLocalRoot, &fname, 1);
zFile = db_text(0, "SELECT '%qci-comment-'||hex(randomblob(6))||'.txt'",
blob_str(&fname));
}else{
file_tempname(&fname, "ci-comment");
zFile = mprintf("%s", blob_str(&fname));
}
blob_reset(&fname);
}
#if defined(_WIN32)
blob_add_cr(pPrompt);
#endif
blob_write_to_file(pPrompt, zFile);
|
| ︙ | ︙ |
Changes to src/file.c.
| ︙ | ︙ | |||
1433 1434 1435 1436 1437 1438 1439 |
blob_zero(pBuf);
if( cnt++>20 ) fossil_panic("cannot generate a temporary filename");
sqlite3_randomness(15, zRand);
for(i=0; i<15; i++){
zRand[i] = (char)zChars[ ((unsigned char)zRand[i])%(sizeof(zChars)-1) ];
}
zRand[15] = 0;
| | | 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 |
blob_zero(pBuf);
if( cnt++>20 ) fossil_panic("cannot generate a temporary filename");
sqlite3_randomness(15, zRand);
for(i=0; i<15; i++){
zRand[i] = (char)zChars[ ((unsigned char)zRand[i])%(sizeof(zChars)-1) ];
}
zRand[15] = 0;
blob_appendf(pBuf, "%s/%s-%s.txt", zDir, zPrefix ? zPrefix : "", zRand);
}while( file_size(blob_str(pBuf))>=0 );
#if defined(_WIN32)
fossil_path_free((char *)azDirs[0]);
fossil_path_free((char *)azDirs[1]);
fossil_path_free((char *)azDirs[2]);
#else
|
| ︙ | ︙ |