| | @@ -278,6 +278,8 @@ struct Running { |
| 278 | 278 | exit: Option<bool>, |
| 279 | 279 | cancel_sequence: Option<u64>, |
| 280 | 280 | conflict_ids: BTreeSet<u64>, |
| 281 | +추가: resolved_ids: BTreeSet<u32>, |
| 282 | +추가: file_ids: BTreeSet<u32>, |
| 281 | 283 | } |
| 282 | 284 | #[derive(Clone, Copy, Debug, Default, Eq, PartialEq)] |
| 283 | 285 | pub enum Close { |
| | @@ -432,6 +434,13 @@ impl Model { |
| 432 | 434 | exit: None, |
| 433 | 435 | cancel_sequence: None, |
| 434 | 436 | conflict_ids: BTreeSet::new(), |
| 437 | +추가: resolved_ids: BTreeSet::new(), |
| 438 | +추가: file_ids: self |
| 439 | +추가: .entries |
| 440 | +추가: .iter() |
| 441 | +추가: .filter(|e| e.kind == Kind::File) |
| 442 | +추가: .map(|e| e.id) |
| 443 | +추가: .collect(), |
| 435 | 444 | }); |
| 436 | 445 | started |
| 437 | 446 | } |
| | @@ -726,16 +735,11 @@ impl Model { |
| 726 | 735 | } |
| 727 | 736 | Event::ConflictResolved(resolution) => { |
| 728 | 737 | if !matches!(run.start, Start::Extract { .. }) |
| 729 | | -삭제: || !self.entries.iter().any(|entry| { |
| 730 | | -삭제: entry.id == resolution.entry_id && entry.kind == Kind::File |
| 731 | | -삭제: }) |
| 738 | +추가: || !run.file_ids.contains(&resolution.entry_id) |
| 732 | 739 | || self.resolutions.len() >= 100_000 |
| 733 | | -삭제: || self |
| 734 | | -삭제: .resolutions |
| 735 | | -삭제: .iter() |
| 736 | | -삭제: .any(|r| r.entry_id == resolution.entry_id) |
| 737 | 740 | || !valid_relative(&resolution.relative_name) |
| 738 | 741 | || resolution.relative_name.len() > 4096 |
| 742 | +추가: || !run.resolved_ids.insert(resolution.entry_id) |
| 739 | 743 | { |
| 740 | 744 | self.error = Some("파일 충돌 결과가 유효하지 않습니다".into()); |
| 741 | 745 | } else { |