Fossil SCM
bug-fix: is_temporary_file expects utf8, not unicode on Windows
Commit
0e6b7bc363e9e22fa116d110aaac3822a3bbd675
Parent
6545e6cf7409fdb…
1 file changed
+2
-2
+2
-2
| --- src/vfile.c | ||
| +++ src/vfile.c | ||
| @@ -474,25 +474,25 @@ | ||
| 474 | 474 | if( pEntry->d_name[1]==0 ) continue; |
| 475 | 475 | if( pEntry->d_name[1]=='.' && pEntry->d_name[2]==0 ) continue; |
| 476 | 476 | } |
| 477 | 477 | zUtf8 = fossil_unicode_to_utf8(pEntry->d_name); |
| 478 | 478 | blob_appendf(pPath, "/%s", zUtf8); |
| 479 | - fossil_mbcs_free(zUtf8); | |
| 480 | 479 | zPath = blob_str(pPath); |
| 481 | 480 | if( glob_match(pIgnore, &zPath[nPrefix+1]) ){ |
| 482 | 481 | /* do nothing */ |
| 483 | 482 | }else if( file_wd_isdir(zPath)==1 ){ |
| 484 | 483 | if( !vfile_top_of_checkout(zPath) ){ |
| 485 | 484 | vfile_scan(pPath, nPrefix, scanFlags, pIgnore); |
| 486 | 485 | } |
| 487 | 486 | }else if( file_wd_isfile_or_link(zPath) ){ |
| 488 | - if( (scanFlags & SCAN_TEMP)==0 || is_temporary_file(pEntry->d_name) ){ | |
| 487 | + if( (scanFlags & SCAN_TEMP)==0 || is_temporary_file(zUtf8) ){ | |
| 489 | 488 | db_bind_text(&ins, ":file", &zPath[nPrefix+1]); |
| 490 | 489 | db_step(&ins); |
| 491 | 490 | db_reset(&ins); |
| 492 | 491 | } |
| 493 | 492 | } |
| 493 | + fossil_mbcs_free(zUtf8); | |
| 494 | 494 | blob_resize(pPath, origSize); |
| 495 | 495 | } |
| 496 | 496 | closedir(d); |
| 497 | 497 | } |
| 498 | 498 | fossil_mbcs_free(zMbcs); |
| 499 | 499 |
| --- src/vfile.c | |
| +++ src/vfile.c | |
| @@ -474,25 +474,25 @@ | |
| 474 | if( pEntry->d_name[1]==0 ) continue; |
| 475 | if( pEntry->d_name[1]=='.' && pEntry->d_name[2]==0 ) continue; |
| 476 | } |
| 477 | zUtf8 = fossil_unicode_to_utf8(pEntry->d_name); |
| 478 | blob_appendf(pPath, "/%s", zUtf8); |
| 479 | fossil_mbcs_free(zUtf8); |
| 480 | zPath = blob_str(pPath); |
| 481 | if( glob_match(pIgnore, &zPath[nPrefix+1]) ){ |
| 482 | /* do nothing */ |
| 483 | }else if( file_wd_isdir(zPath)==1 ){ |
| 484 | if( !vfile_top_of_checkout(zPath) ){ |
| 485 | vfile_scan(pPath, nPrefix, scanFlags, pIgnore); |
| 486 | } |
| 487 | }else if( file_wd_isfile_or_link(zPath) ){ |
| 488 | if( (scanFlags & SCAN_TEMP)==0 || is_temporary_file(pEntry->d_name) ){ |
| 489 | db_bind_text(&ins, ":file", &zPath[nPrefix+1]); |
| 490 | db_step(&ins); |
| 491 | db_reset(&ins); |
| 492 | } |
| 493 | } |
| 494 | blob_resize(pPath, origSize); |
| 495 | } |
| 496 | closedir(d); |
| 497 | } |
| 498 | fossil_mbcs_free(zMbcs); |
| 499 |
| --- src/vfile.c | |
| +++ src/vfile.c | |
| @@ -474,25 +474,25 @@ | |
| 474 | if( pEntry->d_name[1]==0 ) continue; |
| 475 | if( pEntry->d_name[1]=='.' && pEntry->d_name[2]==0 ) continue; |
| 476 | } |
| 477 | zUtf8 = fossil_unicode_to_utf8(pEntry->d_name); |
| 478 | blob_appendf(pPath, "/%s", zUtf8); |
| 479 | zPath = blob_str(pPath); |
| 480 | if( glob_match(pIgnore, &zPath[nPrefix+1]) ){ |
| 481 | /* do nothing */ |
| 482 | }else if( file_wd_isdir(zPath)==1 ){ |
| 483 | if( !vfile_top_of_checkout(zPath) ){ |
| 484 | vfile_scan(pPath, nPrefix, scanFlags, pIgnore); |
| 485 | } |
| 486 | }else if( file_wd_isfile_or_link(zPath) ){ |
| 487 | if( (scanFlags & SCAN_TEMP)==0 || is_temporary_file(zUtf8) ){ |
| 488 | db_bind_text(&ins, ":file", &zPath[nPrefix+1]); |
| 489 | db_step(&ins); |
| 490 | db_reset(&ins); |
| 491 | } |
| 492 | } |
| 493 | fossil_mbcs_free(zUtf8); |
| 494 | blob_resize(pPath, origSize); |
| 495 | } |
| 496 | closedir(d); |
| 497 | } |
| 498 | fossil_mbcs_free(zMbcs); |
| 499 |