Fossil SCM

bug-fix: is_temporary_file expects utf8, not unicode on Windows

jan.nijtmans 2012-10-15 05:09 trunk
Commit 0e6b7bc363e9e22fa116d110aaac3822a3bbd675
1 file changed +2 -2
+2 -2
--- src/vfile.c
+++ src/vfile.c
@@ -474,25 +474,25 @@
474474
if( pEntry->d_name[1]==0 ) continue;
475475
if( pEntry->d_name[1]=='.' && pEntry->d_name[2]==0 ) continue;
476476
}
477477
zUtf8 = fossil_unicode_to_utf8(pEntry->d_name);
478478
blob_appendf(pPath, "/%s", zUtf8);
479
- fossil_mbcs_free(zUtf8);
480479
zPath = blob_str(pPath);
481480
if( glob_match(pIgnore, &zPath[nPrefix+1]) ){
482481
/* do nothing */
483482
}else if( file_wd_isdir(zPath)==1 ){
484483
if( !vfile_top_of_checkout(zPath) ){
485484
vfile_scan(pPath, nPrefix, scanFlags, pIgnore);
486485
}
487486
}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) ){
489488
db_bind_text(&ins, ":file", &zPath[nPrefix+1]);
490489
db_step(&ins);
491490
db_reset(&ins);
492491
}
493492
}
493
+ fossil_mbcs_free(zUtf8);
494494
blob_resize(pPath, origSize);
495495
}
496496
closedir(d);
497497
}
498498
fossil_mbcs_free(zMbcs);
499499
--- 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

Keyboard Shortcuts

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