File tree 1 file changed +8
-3
lines changed
1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -558,8 +558,13 @@ pub fn serialize_repo(
558
558
559
559
// Skip if matched by our ignore patterns
560
560
let mut skip = false ;
561
+ #[ cfg( windows) ]
562
+ let pattern_path = rel_str. replace ( '\\' , "/" ) ;
563
+ #[ cfg( not( windows) ) ]
564
+ let pattern_path = rel_str. to_string ( ) ;
565
+
561
566
for pat in & final_config. ignore_patterns {
562
- if pat. is_match ( & rel_str ) {
567
+ if pat. is_match ( & pattern_path ) {
563
568
debug ! ( "Skipping {} - matched ignore pattern" , rel_str) ;
564
569
skip = true ;
565
570
break ;
@@ -571,14 +576,14 @@ pub fn serialize_repo(
571
576
572
577
// Calculate priority score
573
578
let mut priority = get_file_priority (
574
- & rel_str ,
579
+ & pattern_path ,
575
580
& final_config. ignore_patterns ,
576
581
& final_config. priority_list ,
577
582
) ;
578
583
579
584
// Boost priority for recently modified files
580
585
if let Some ( ref times) = commit_times {
581
- if let Some ( ts) = times. get ( & rel_str . to_string ( ) ) {
586
+ if let Some ( ts) = times. get ( & pattern_path ) {
582
587
let now = SystemTime :: now ( )
583
588
. duration_since ( UNIX_EPOCH )
584
589
. unwrap_or_else ( |_| Duration :: from_secs ( 0 ) )
You can’t perform that action at this time.
0 commit comments