Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Convert the return value of getcwd() from MBCS into UTF8 before using it. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
ef04076777f27acf29ab2cdf51f7bb81 |
User & Date: | drh 2011-05-20 14:17:54.980 |
Context
2011-05-20
| ||
15:31 | Abstract the getcwd() system library routine into file_getcwd() with appropriate translations on windows. ... (check-in: 4b342540 user: drh tags: trunk) | |
14:17 | Convert the return value of getcwd() from MBCS into UTF8 before using it. ... (check-in: ef040767 user: drh tags: trunk) | |
12:29 | Do not short-circuit the update command if the --verbose option is used. ... (check-in: 3b5db9a1 user: drh tags: trunk) | |
Changes
Changes to src/file.c.
︙ | ︙ | |||
399 400 401 402 403 404 405 406 407 408 409 | && (zOrigName[2]=='\\' || zOrigName[2]=='/')) #endif ){ blob_set(pOut, zOrigName); blob_materialize(pOut); }else{ char zPwd[2000]; if( getcwd(zPwd, sizeof(zPwd)-20)==0 ){ fossil_fatal("pwd too big: max %d\n", (int)sizeof(zPwd)-20); } blob_zero(pOut); | > > | > | 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 | && (zOrigName[2]=='\\' || zOrigName[2]=='/')) #endif ){ blob_set(pOut, zOrigName); blob_materialize(pOut); }else{ char zPwd[2000]; char *zPwdUtf8; if( getcwd(zPwd, sizeof(zPwd)-20)==0 ){ fossil_fatal("pwd too big: max %d\n", (int)sizeof(zPwd)-20); } blob_zero(pOut); zPwdUtf8 = fossil_mbcs_to_utf8(zPwd); blob_appendf(pOut, "%//%/", zPwdUtf8, zOrigName); fossil_mbcs_free(zPwdUtf8); } blob_resize(pOut, file_simplify_name(blob_buffer(pOut), blob_size(pOut))); } /* ** COMMAND: test-canonical-name ** Usage: %fossil test-canonical-name FILENAME... |
︙ | ︙ |