Merge pull request #92 from Team-LJY/fix/windows-create-path
Windows ZIP 생성 경로와 실패 안내 수정
- 작성자
- LeeJunyoung
- 작성 시각
- 커밋
3d5e4c01d585c848787722e3c9f8f31b80b1f6fb
변경된 파일 11개
+335-33| @@ -0,0 +1,30 @@ | ||
| 1 | 추가: use std::path::{Path, PathBuf}; | |
| 2 | 추가: | |
| 3 | 추가: pub fn windows_path(text: &str) -> String { | |
| 4 | 추가: let Some(path) = text.strip_prefix(r"\\?\") else { | |
| 5 | 추가: return text.to_owned(); | |
| 6 | 추가: }; | |
| 7 | 추가: let bytes = path.as_bytes(); | |
| 8 | 추가: // 일반 드라이브의 의미가 바뀌지 않는 경로만 변환함. | |
| 9 | 추가: if bytes.len() < 3 | |
| 10 | 추가: || !bytes[0].is_ascii_alphabetic() | |
| 11 | 추가: || &bytes[1..3] != b":\\" | |
| 12 | 추가: || (path.len() > 3 | |
| 13 | 추가: && path[3..].split('\\').any(|part| { | |
| 14 | 추가: part.is_empty() | |
| 15 | 추가: || worker_protocol::archive::valid_name(part, false).is_err() | |
| 16 | 추가: || part.contains('/') | |
| 17 | 추가: })) | |
| 18 | 추가: { | |
| 19 | 추가: return text.to_owned(); | |
| 20 | 추가: } | |
| 21 | 추가: path.to_owned() | |
| 22 | 추가: } | |
| 23 | 추가: | |
| 24 | 추가: pub fn worker_path(path: &Path) -> PathBuf { | |
| 25 | 추가: #[cfg(windows)] | |
| 26 | 추가: if let Some(text) = path.to_str() { | |
| 27 | 추가: return PathBuf::from(windows_path(text)); | |
| 28 | 추가: } | |
| 29 | 추가: path.to_path_buf() | |
| 30 | 추가: } |
| @@ -382,3 +382,16 @@ pub fn gzip_output_name(archive: &Path) -> String { | ||
| 382 | 382 | "압축 해제 파일".into() |
| 383 | 383 | } |
| 384 | 384 | } |
| 385 | 추가: | |
| 386 | 추가: pub fn operation_text(text: &str, creating: bool) -> String { | |
| 387 | 추가: if creating { | |
| 388 | 추가: text.replace("풀 위치", "저장 위치") | |
| 389 | 추가: .replace("선택한 항목", "추가한 항목") | |
| 390 | 추가: .replace( | |
| 391 | 추가: "일부 파일만 풀렸습니다. 풀린 파일은", | |
| 392 | 추가: "ZIP 파일이 일부만 저장됐습니다. 저장된 파일은", | |
| 393 | 추가: ) | |
| 394 | 추가: } else { | |
| 395 | 추가: text.to_owned() | |
| 396 | 추가: } | |
| 397 | 추가: } |
| @@ -150,7 +150,7 @@ fn list_to_ui(id: wire::ListId) -> ui::ListId { | ||
| 150 | 150 | fn start_to_wire(start: ui::Start) -> wire::Start { |
| 151 | 151 | let action = match start { |
| 152 | 152 | ui::Start::List { archive } => wire::Action::List { |
| 153 | 삭제: archive: wire::NativePath::from_path(&archive), | |
| 153 | 추가: archive: wire::NativePath::from_path(&crate::archive_path::worker_path(&archive)), | |
| 154 | 154 | }, |
| 155 | 155 | ui::Start::Extract { |
| 156 | 156 | archive, |
| @@ -159,8 +159,10 @@ fn start_to_wire(start: ui::Start) -> wire::Start { | ||
| 159 | 159 | list_id, |
| 160 | 160 | gzip_output_name, |
| 161 | 161 | } => wire::Action::Extract { |
| 162 | 삭제: archive: wire::NativePath::from_path(&archive), | |
| 163 | 삭제: destination: wire::NativePath::from_path(&destination), | |
| 162 | 추가: archive: wire::NativePath::from_path(&crate::archive_path::worker_path(&archive)), | |
| 163 | 추가: destination: wire::NativePath::from_path(&crate::archive_path::worker_path( | |
| 164 | 추가: &destination, | |
| 165 | 추가: )), | |
| 164 | 166 | selection: match selection { |
| 165 | 167 | ui::Selection::All => wire::Selection::All, |
| 166 | 168 | ui::Selection::EntryIds(ids) => wire::Selection::EntryIds(ids), |
| @@ -177,11 +179,13 @@ fn start_to_wire(start: ui::Start) -> wire::Start { | ||
| 177 | 179 | sources: sources |
| 178 | 180 | .into_iter() |
| 179 | 181 | .map(|(path, archive_name)| wire::Source { |
| 180 | 삭제: path: wire::NativePath::from_path(&path), | |
| 182 | 추가: path: wire::NativePath::from_path(&crate::archive_path::worker_path(&path)), | |
| 181 | 183 | archive_name, |
| 182 | 184 | }) |
| 183 | 185 | .collect(), |
| 184 | 삭제: output_file: wire::NativePath::from_path(&output_file), | |
| 186 | 추가: output_file: wire::NativePath::from_path(&crate::archive_path::worker_path( | |
| 187 | 추가: &output_file, | |
| 188 | 추가: )), | |
| 185 | 189 | method: match method { |
| 186 | 190 | ui::Method::Store => wire::Method::Store, |
| 187 | 191 | ui::Method::Deflate => wire::Method::Deflate, |
| @@ -162,7 +162,7 @@ impl ArchiveApp { | ||
| 162 | 162 | self.ui_error = Some("파일이나 폴더의 이름을 확인하세요".into()); |
| 163 | 163 | return; |
| 164 | 164 | } |
| 165 | 삭제: validated.push(path); | |
| 165 | 추가: validated.push(crate::archive_path::worker_path(&path)); | |
| 166 | 166 | } |
| 167 | 167 | let paths = validated; |
| 168 | 168 | if self.sources.is_empty() { |
| @@ -895,7 +895,11 @@ impl ArchiveApp { | ||
| 895 | 895 | if error.starts_with("암호는") { |
| 896 | 896 | error.as_str() |
| 897 | 897 | } else { |
| 898 | 삭제: "풀 위치와 선택한 항목을 확인하세요" | |
| 898 | 추가: if matches!(self.last_request, Some(Start::CreateZip { .. })) { | |
| 899 | 추가: "저장 위치와 추가한 항목을 확인하세요" | |
| 900 | 추가: } else { | |
| 901 | 추가: "풀 위치와 선택한 항목을 확인하세요" | |
| 902 | 추가: } | |
| 899 | 903 | }, |
| 900 | 904 | ); |
| 901 | 905 | } |
| @@ -1034,12 +1038,15 @@ impl ArchiveApp { | ||
| 1034 | 1038 | theme::bounded_text(ui, &path, ui.available_width()); |
| 1035 | 1039 | } else if let Some(code) = t.as_ref().and_then(|t| t.error) { |
| 1036 | 1040 | ui.label(if creating && code == ErrorCode::SourceChanged { |
| 1037 | 삭제: "묶을 파일이 바뀌었습니다. 파일을 확인한 뒤 다시 만드세요" | |
| 1041 | 추가: "묶을 파일이 바뀌었습니다. 파일을 확인한 뒤 다시 만드세요".to_owned() | |
| 1038 | 1042 | } else { |
| 1039 | 삭제: present::error_text(code) | |
| 1043 | 추가: present::operation_text(present::error_text(code), creating) | |
| 1040 | 1044 | }); |
| 1041 | 1045 | } else if let Some(error) = &self.model.error { |
| 1042 | 삭제: ui.label(present::client_error_text(error)); | |
| 1046 | 추가: ui.label(present::operation_text( | |
| 1047 | 추가: present::client_error_text(error), | |
| 1048 | 추가: creating, | |
| 1049 | 추가: )); | |
| 1043 | 1050 | } |
| 1044 | 1051 | for warning in warnings |
| 1045 | 1052 | .iter() |
| @@ -1048,7 +1055,10 @@ impl ArchiveApp { | ||
| 1048 | 1055 | { |
| 1049 | 1056 | ui.horizontal_wrapped(|ui| { |
| 1050 | 1057 | theme::icon(ui, Icon::Warning, 20.0); |
| 1051 | 삭제: ui.colored_label(theme::WARNING, warning); | |
| 1058 | 추가: ui.colored_label( | |
| 1059 | 추가: theme::WARNING, | |
| 1060 | 추가: present::operation_text(warning, creating), | |
| 1061 | 추가: ); | |
| 1052 | 1062 | }); |
| 1053 | 1063 | } |
| 1054 | 1064 | if !success |
| @@ -1059,13 +1069,17 @@ impl ArchiveApp { | ||
| 1059 | 1069 | &self.model.outputs, |
| 1060 | 1070 | ) |
| 1061 | 1071 | { |
| 1062 | 삭제: ui.label("아무 파일도 풀지 않았습니다"); | |
| 1072 | 추가: ui.label(if creating { | |
| 1073 | 추가: "ZIP 파일을 만들지 않았습니다" | |
| 1074 | 추가: } else { | |
| 1075 | 추가: "아무 파일도 풀지 않았습니다" | |
| 1076 | 추가: }); | |
| 1063 | 1077 | } |
| 1064 | 1078 | if self.details { |
| 1065 | 1079 | theme::panel(theme::STRIPE).show(ui, |ui| { |
| 1066 | 1080 | if durability_in_details { |
| 1067 | 1081 | if let Some(warning) = durability_warning { |
| 1068 | 삭제: ui.label(warning); | |
| 1082 | 추가: ui.label(present::operation_text(warning, creating)); | |
| 1069 | 1083 | } |
| 1070 | 1084 | } |
| 1071 | 1085 | if let Some(t) = &t { |
| @@ -1441,23 +1455,27 @@ impl ArchiveApp { | ||
| 1441 | 1455 | } |
| 1442 | 1456 | } |
| 1443 | 1457 | Close::Review => { |
| 1458 | 추가: let creating = matches!(self.last_request, Some(Start::CreateZip { .. })); | |
| 1444 | 1459 | ui.heading("결과 확인 후 닫기"); |
| 1445 | 1460 | let wrote = self |
| 1446 | 1461 | .last_request |
| 1447 | 1462 | .as_ref() |
| 1448 | 1463 | .is_some_and(|request| !matches!(request, Start::List { .. })); |
| 1449 | 1464 | ui.label(if !wrote { |
| 1450 | 삭제: "프로그램을 닫을까요?" | |
| 1465 | 추가: "프로그램을 닫을까요?".to_owned() | |
| 1451 | 1466 | } else if self.model.confirmed { |
| 1452 | 삭제: "작업 결과를 확인한 뒤 닫으세요" | |
| 1467 | 추가: "작업 결과를 확인한 뒤 닫으세요".to_owned() | |
| 1453 | 1468 | } else { |
| 1454 | 삭제: present::UNCERTAIN | |
| 1469 | 추가: present::operation_text(present::UNCERTAIN, creating) | |
| 1455 | 1470 | }); |
| 1456 | 1471 | egui::ScrollArea::vertical() |
| 1457 | 1472 | .max_height(160.0) |
| 1458 | 1473 | .show(ui, |ui| { |
| 1459 | 1474 | if let Some(code) = self.model.terminal.as_ref().and_then(|t| t.error) { |
| 1460 | 삭제: ui.colored_label(theme::ERROR, present::error_text(code)); | |
| 1475 | 추가: ui.colored_label( | |
| 1476 | 추가: theme::ERROR, | |
| 1477 | 추가: present::operation_text(present::error_text(code), creating), | |
| 1478 | 추가: ); | |
| 1461 | 1479 | } |
| 1462 | 1480 | if wrote { |
| 1463 | 1481 | for warning in present::warnings( |
| @@ -1467,7 +1485,10 @@ impl ArchiveApp { | ||
| 1467 | 1485 | &self.directories, |
| 1468 | 1486 | &self.model.outputs, |
| 1469 | 1487 | ) { |
| 1470 | 삭제: ui.colored_label(theme::WARNING, warning); | |
| 1488 | 추가: ui.colored_label( | |
| 1489 | 추가: theme::WARNING, | |
| 1490 | 추가: present::operation_text(warning, creating), | |
| 1491 | 추가: ); | |
| 1471 | 1492 | } |
| 1472 | 1493 | } |
| 1473 | 1494 | }); |
| @@ -19,3 +19,5 @@ pub mod archive_browser; | ||
| 19 | 19 | pub mod archive_dialog; |
| 20 | 20 | #[cfg(feature = "ui")] |
| 21 | 21 | pub mod archive_theme; |
| 22 | 추가: | |
| 23 | 추가: pub mod archive_path; |
| @@ -1,9 +1,92 @@ | ||
| 1 | 1 | #![allow(dead_code)] |
| 2 | 2 | #[path = "../../experiments/rust-ui-memory-app/src/archive_ui.rs"] |
| 3 | 3 | mod archive_ui; |
| 4 | 추가: use zipelo_ui_memory_app::archive_path; | |
| 4 | 5 | mod adapter { |
| 5 | 6 | include!("../../experiments/rust-ui-memory-app/src/archive_process.rs"); |
| 6 | 7 | |
| 8 | 추가: #[cfg(windows)] | |
| 9 | 추가: #[test] | |
| 10 | 추가: fn all_worker_path_fields_use_the_same_safe_drive_conversion() { | |
| 11 | 추가: use std::path::{Path, PathBuf}; | |
| 12 | 추가: let input = PathBuf::from(r"\\?\C:\fixture\archive.zip"); | |
| 13 | 추가: let output = PathBuf::from(r"\\?\C:\fixture\output"); | |
| 14 | 추가: let expected_input = Path::new(r"C:\fixture\archive.zip"); | |
| 15 | 추가: let expected_output = Path::new(r"C:\fixture\output"); | |
| 16 | 추가: let wire::Action::List { archive } = start_to_wire(ui::Start::List { | |
| 17 | 추가: archive: input.clone(), | |
| 18 | 추가: }) | |
| 19 | 추가: .action | |
| 20 | 추가: else { | |
| 21 | 추가: panic!("목록 요청 누락") | |
| 22 | 추가: }; | |
| 23 | 추가: assert_eq!(archive.to_path().unwrap(), expected_input); | |
| 24 | 추가: let wire::Action::Extract { | |
| 25 | 추가: archive, | |
| 26 | 추가: destination, | |
| 27 | 추가: .. | |
| 28 | 추가: } = start_to_wire(ui::Start::Extract { | |
| 29 | 추가: archive: input.clone(), | |
| 30 | 추가: destination: output.clone(), | |
| 31 | 추가: selection: ui::Selection::All, | |
| 32 | 추가: list_id: token( | |
| 33 | 추가: ui::Format::Zip, | |
| 34 | 추가: ui::SourceObject::Windows { | |
| 35 | 추가: volume: 1, | |
| 36 | 추가: file_id: [2; 16], | |
| 37 | 추가: }, | |
| 38 | 추가: ), | |
| 39 | 추가: gzip_output_name: None, | |
| 40 | 추가: }) | |
| 41 | 추가: .action | |
| 42 | 추가: else { | |
| 43 | 추가: panic!("추출 요청 누락") | |
| 44 | 추가: }; | |
| 45 | 추가: assert_eq!(archive.to_path().unwrap(), expected_input); | |
| 46 | 추가: assert_eq!(destination.to_path().unwrap(), expected_output); | |
| 47 | 추가: for aes256 in [false, true] { | |
| 48 | 추가: let wire::Action::CreateZip { | |
| 49 | 추가: sources, | |
| 50 | 추가: output_file, | |
| 51 | 추가: encryption, | |
| 52 | 추가: .. | |
| 53 | 추가: } = start_to_wire(ui::Start::CreateZip { | |
| 54 | 추가: sources: vec![(input.clone(), "source.txt".into())], | |
| 55 | 추가: output_file: output.clone(), | |
| 56 | 추가: method: ui::Method::Deflate, | |
| 57 | 추가: aes256, | |
| 58 | 추가: }) | |
| 59 | 추가: .action | |
| 60 | 추가: else { | |
| 61 | 추가: panic!("생성 요청 누락") | |
| 62 | 추가: }; | |
| 63 | 추가: assert_eq!(sources[0].path.to_path().unwrap(), expected_input); | |
| 64 | 추가: assert_eq!(output_file.to_path().unwrap(), expected_output); | |
| 65 | 추가: assert_eq!( | |
| 66 | 추가: encryption, | |
| 67 | 추가: if aes256 { | |
| 68 | 추가: wire::Encryption::Aes256 | |
| 69 | 추가: } else { | |
| 70 | 추가: wire::Encryption::None | |
| 71 | 추가: } | |
| 72 | 추가: ); | |
| 73 | 추가: } | |
| 74 | 추가: for text in [ | |
| 75 | 추가: r"\\?\UNC\server\share\one.zip", | |
| 76 | 추가: r"\\server\share\one.zip", | |
| 77 | 추가: r"\\?\C:\a\..\one.zip", | |
| 78 | 추가: ] { | |
| 79 | 추가: let wire::Action::List { archive } = start_to_wire(ui::Start::List { | |
| 80 | 추가: archive: text.into(), | |
| 81 | 추가: }) | |
| 82 | 추가: .action | |
| 83 | 추가: else { | |
| 84 | 추가: panic!("목록 요청 누락") | |
| 85 | 추가: }; | |
| 86 | 추가: assert!(archive.to_path().is_err()); | |
| 87 | 추가: } | |
| 88 | 추가: } | |
| 89 | 추가: | |
| 7 | 90 | fn token(format: ui::Format, source_object: ui::SourceObject) -> ui::ListId { |
| 8 | 91 | ui::ListId { |
| 9 | 92 | catalog_version: 1, |
| @@ -773,8 +773,13 @@ mod widgets { | ||
| 773 | 773 | assert!(shown.iter().any(|(text, _)| text == "폴더 열기")); |
| 774 | 774 | assert!(!shown.iter().any(|(text, _)| text == "다시 시도")); |
| 775 | 775 | assert!(!shown.iter().any(|(text, _)| text == SYNC_WARNING)); |
| 776 | 추가: let sync_failed = if creating { | |
| 777 | 추가: "파일을 디스크에 완전히 저장하지 못했습니다. 저장 위치 폴더를 확인하세요." | |
| 778 | 추가: } else { | |
| 779 | 추가: "파일을 디스크에 완전히 저장하지 못했습니다. 풀 위치 폴더를 확인하세요." | |
| 780 | 추가: }; | |
| 776 | 781 | assert_eq!( |
| 777 | 삭제: shown.iter().any(|(text, _)| text == "파일을 디스크에 완전히 저장하지 못했습니다. 풀 위치 폴더를 확인하세요."), | |
| 782 | 추가: shown.iter().any(|(text, _)| text == sync_failed), | |
| 778 | 783 | durability == Durability::Failed |
| 779 | 784 | ); |
| 780 | 785 | policy_click(&ctx, &mut app, "자세히 보기"); |
| @@ -787,7 +792,7 @@ mod widgets { | ||
| 787 | 792 | let closed = policy_render(&ctx, &mut app, vec![]); |
| 788 | 793 | assert!(!closed.iter().any(|(text, _)| text == SYNC_WARNING)); |
| 789 | 794 | assert_eq!( |
| 790 | 삭제: closed.iter().any(|(text, _)| text == "파일을 디스크에 완전히 저장하지 못했습니다. 풀 위치 폴더를 확인하세요."), | |
| 795 | 추가: closed.iter().any(|(text, _)| text == sync_failed), | |
| 791 | 796 | durability == Durability::Failed |
| 792 | 797 | ); |
| 793 | 798 | assert!(closed.iter().any(|(text, _)| text == "폴더 열기")); |
| @@ -856,3 +856,5 @@ fn password_validation_and_retry_do_not_erase_transport_failure() { | ||
| 856 | 856 | } |
| 857 | 857 | |
| 858 | 858 | mod presentation; |
| 859 | 추가: | |
| 860 | 추가: mod windows_paths; |
| @@ -316,7 +316,11 @@ fn excluding_a_child_after_folder_selection_does_not_restore_it_during_extractio | ||
| 316 | 316 | app.model.selected = [0, 1, 2].into_iter().collect(); |
| 317 | 317 | app.browse_folder("docs"); |
| 318 | 318 | let dialogs = TestDialogs::default(); |
| 319 | 삭제: dialogs.0.borrow_mut().answers.push_back(Some(vec![scratch.0.clone()])); | |
| 319 | 추가: dialogs | |
| 320 | 추가: .0 | |
| 321 | 추가: .borrow_mut() | |
| 322 | 추가: .answers | |
| 323 | 추가: .push_back(Some(vec![scratch.0.clone()])); | |
| 320 | 324 | app.set_dialogs(Box::new(dialogs)); |
| 321 | 325 | let ctx = egui::Context::default(); |
| 322 | 326 | policy_click(&ctx, &mut app, "excluded.txt"); |
| @@ -340,7 +344,11 @@ fn gzip_save_cancel_and_invalid_output_do_not_start_an_extraction() { | ||
| 340 | 344 | policy_click(&ctx, &mut app, "압축해제"); |
| 341 | 345 | assert_eq!(factory.state.borrow().starts.len(), 1); |
| 342 | 346 | assert_eq!(dialogs.0.borrow().requests[0].purpose, Purpose::SaveGzip); |
| 343 | 삭제: dialogs.0.borrow_mut().answers.push_back(Some(vec![scratch.0.join("invalid:name")])); | |
| 347 | 추가: dialogs | |
| 348 | 추가: .0 | |
| 349 | 추가: .borrow_mut() | |
| 350 | 추가: .answers | |
| 351 | 추가: .push_back(Some(vec![scratch.0.join("invalid:name")])); | |
| 344 | 352 | policy_click(&ctx, &mut app, "압축해제"); |
| 345 | 353 | assert_eq!(factory.state.borrow().starts.len(), 1); |
| 346 | 354 | assert!(!app.model.busy()); |
| @@ -465,3 +473,43 @@ fn empty_list_notices_remain_visible_in_the_archive_content_area() { | ||
| 465 | 473 | assert_eq!(factory.state.borrow().starts.len(), 1); |
| 466 | 474 | } |
| 467 | 475 | } |
| 476 | 추가: | |
| 477 | 추가: #[test] | |
| 478 | 추가: fn failed_zip_creation_shows_save_location_and_no_extraction_copy() { | |
| 479 | 추가: let scratch = Folder::new(); | |
| 480 | 추가: let factory = FakeFactory::default(); | |
| 481 | 추가: let mut app = ArchiveApp::new(Box::new(factory.clone()), None, false); | |
| 482 | 추가: app.set_dialogs(Box::new(TestDialogs::default())); | |
| 483 | 추가: let source = scratch.0.join("source.txt"); | |
| 484 | 추가: fs::write(&source, b"source").unwrap(); | |
| 485 | 추가: app.add_sources(vec![source]); | |
| 486 | 추가: let ctx = egui::Context::default(); | |
| 487 | 추가: policy_click(&ctx, &mut app, "압축하기"); | |
| 488 | 추가: for _ in 0..30 { | |
| 489 | 추가: policy_render(&ctx, &mut app, vec![]); | |
| 490 | 추가: } | |
| 491 | 추가: assert!(!app.model.busy()); | |
| 492 | 추가: app.model.outputs.clear(); | |
| 493 | 추가: app.model.terminal = Some(Terminal { | |
| 494 | 추가: outcome: Outcome::Failed, | |
| 495 | 추가: error: Some(ErrorCode::InvalidRequest), | |
| 496 | 추가: publication: Publication::None, | |
| 497 | 추가: created_count: 0, | |
| 498 | 추가: retained_partial_count: 0, | |
| 499 | 추가: durability: Durability::NotApplicable, | |
| 500 | 추가: cleanup: Cleanup::Complete, | |
| 501 | 추가: }); | |
| 502 | 추가: let shown = policy_render(&ctx, &mut app, vec![]); | |
| 503 | 추가: for expected in [ | |
| 504 | 추가: "ZIP 파일을 만들지 못했습니다", | |
| 505 | 추가: "저장 위치와 추가한 항목을 확인하세요", | |
| 506 | 추가: "ZIP 파일을 만들지 않았습니다", | |
| 507 | 추가: ] { | |
| 508 | 추가: assert!(shown.iter().any(|(text, _)| text == expected), "{shown:?}"); | |
| 509 | 추가: } | |
| 510 | 추가: assert!( | |
| 511 | 추가: !shown | |
| 512 | 추가: .iter() | |
| 513 | 추가: .any(|(text, _)| text.contains("풀 위치") || text.contains("풀지 않았습니다")) | |
| 514 | 추가: ); | |
| 515 | 추가: } |
| @@ -0,0 +1,75 @@ | ||
| 1 | 추가: use zipelo_ui_memory_app::archive_path::windows_path; | |
| 2 | 추가: | |
| 3 | 추가: #[test] | |
| 4 | 추가: fn ordinary_verbatim_drives_are_converted_without_changing_components() { | |
| 5 | 추가: for (input, expected) in [ | |
| 6 | 추가: (r"\\?\C:\Users\사용자\one.txt", r"C:\Users\사용자\one.txt"), | |
| 7 | 추가: (r"\\?\C:\", r"C:\"), | |
| 8 | 추가: (r"D:\one.txt", r"D:\one.txt"), | |
| 9 | 추가: ] { | |
| 10 | 추가: assert_eq!(windows_path(input), expected); | |
| 11 | 추가: } | |
| 12 | 추가: } | |
| 13 | 추가: | |
| 14 | 추가: #[test] | |
| 15 | 추가: fn unc_devices_and_ambiguous_components_remain_blocked() { | |
| 16 | 추가: for input in [ | |
| 17 | 추가: r"\\?\UNC\server\share\one.txt", | |
| 18 | 추가: r"\\server\share\one.txt", | |
| 19 | 추가: r"\\.\C:\one.txt", | |
| 20 | 추가: r"\\?\GLOBALROOT\Device\one", | |
| 21 | 추가: r"\\?\C:\a\..\one", | |
| 22 | 추가: r"\\?\C:\a\.\one", | |
| 23 | 추가: r"\\?\C:\a\name.", | |
| 24 | 추가: r"\\?\C:\a\name ", | |
| 25 | 추가: r"\\?\C:\a\NUL", | |
| 26 | 추가: r"\\?\C:\a\one:stream", | |
| 27 | 추가: r"\\?\C:\a\\one", | |
| 28 | 추가: r"\\?\C:\a/one", | |
| 29 | 추가: r"\\?\C:one", | |
| 30 | 추가: ] { | |
| 31 | 추가: assert_eq!(windows_path(input), input); | |
| 32 | 추가: } | |
| 33 | 추가: } | |
| 34 | 추가: | |
| 35 | 추가: #[test] | |
| 36 | 추가: fn creation_messages_use_save_vocabulary_and_preserve_warnings() { | |
| 37 | 추가: use zipelo_ui_memory_app::archive_present::*; | |
| 38 | 추가: for text in [ | |
| 39 | 추가: UNCERTAIN, | |
| 40 | 추가: PARTIAL, | |
| 41 | 추가: LEFTOVERS, | |
| 42 | 추가: SYNC_FAILED, | |
| 43 | 추가: CLEANUP_WARNING, | |
| 44 | 추가: UNCONFIRMED_FINISH, | |
| 45 | 추가: error_text(zipelo_ui_memory_app::archive_ui::ErrorCode::InvalidRequest), | |
| 46 | 추가: ] { | |
| 47 | 추가: assert_eq!(operation_text(text, false), text); | |
| 48 | 추가: assert!(!operation_text(text, true).contains("풀 위치")); | |
| 49 | 추가: } | |
| 50 | 추가: assert!(operation_text(UNCERTAIN, true).contains("확인하지 못했습니다")); | |
| 51 | 추가: } | |
| 52 | 추가: | |
| 53 | 추가: #[cfg(windows)] | |
| 54 | 추가: #[test] | |
| 55 | 추가: fn windows_native_contract_accepts_drives_and_still_rejects_unc() { | |
| 56 | 추가: use std::path::Path; | |
| 57 | 추가: use worker_protocol::protocol::NativePath; | |
| 58 | 추가: use zipelo_ui_memory_app::archive_path::worker_path; | |
| 59 | 추가: let ordinary = worker_path(Path::new(r"\\?\C:\Users\one.txt")); | |
| 60 | 추가: assert_eq!( | |
| 61 | 추가: NativePath::from_path(&ordinary).to_path().unwrap(), | |
| 62 | 추가: Path::new(r"C:\Users\one.txt") | |
| 63 | 추가: ); | |
| 64 | 추가: for text in [ | |
| 65 | 추가: r"\\?\UNC\server\share\one.txt", | |
| 66 | 추가: r"\\server\share\one.txt", | |
| 67 | 추가: r"\\?\C:\a\..\one", | |
| 68 | 추가: ] { | |
| 69 | 추가: assert!( | |
| 70 | 추가: NativePath::from_path(&worker_path(Path::new(text))) | |
| 71 | 추가: .to_path() | |
| 72 | 추가: .is_err() | |
| 73 | 추가: ); | |
| 74 | 추가: } | |
| 75 | 추가: } |
| @@ -1,17 +1,17 @@ | ||
| 1 | 1 | { |
| 2 | 삭제: "recorded_at_utc": "2026-11-12T07:24:03.358981+00:00", | |
| 3 | 삭제: "tested_local_commit": "b6c645b7509217c0aa44480611e5fc9cf2b22bad", | |
| 4 | 삭제: "tested_source_tree": "5f4e0879caeab4d3a92ebb7ba6520e88303a9968", | |
| 5 | 삭제: "equivalent_remote_source_commit": "949a1fa5685e70f4ab98aada9b99e5ca5b9cfb10", | |
| 2 | 추가: "recorded_at_utc": "2026-11-12T08:38:18.166754+00:00", | |
| 3 | 추가: "tested_local_commit": "bbce491cd2c2adaf6b462a6f17be51e65e86a54e", | |
| 4 | 추가: "tested_source_tree": "2dcb2293a3f4fc3ed91a4f1cc6391461968e6c37", | |
| 5 | 추가: "equivalent_remote_source_commit": "a2ddcdee9554bb1806cf83e5d84e9ca0bdba9777", | |
| 6 | 6 | "command": "python3 tests/ci/run_rust.py local", |
| 7 | 7 | "exit_code": 0, |
| 8 | 삭제: "rust_tests_passed": 1016, | |
| 8 | 추가: "rust_tests_passed": 1020, | |
| 9 | 9 | "runner_tests_passed": 34, |
| 10 | 삭제: "ui_suite_tests_passed": 69, | |
| 10 | 추가: "ui_suite_tests_passed": 73, | |
| 11 | 11 | "actual_worker_ui_tests_passed": 26, |
| 12 | 삭제: "local_log_sha256": "7cf00b3f314939a14be5d6849183c5f78260bd5fe8da7f8ccbe4511fd0f065d0", | |
| 12 | 추가: "local_log_sha256": "cd986a9fdabcf70cf5c10a4eb710440044ff43c2ce857e4dbd7fd80a6c828732", | |
| 13 | 13 | "local_results": { |
| 14 | 삭제: "head": "b6c645b7509217c0aa44480611e5fc9cf2b22bad", | |
| 14 | 추가: "head": "bbce491cd2c2adaf6b462a6f17be51e65e86a54e", | |
| 15 | 15 | "platform": "linux", |
| 16 | 16 | "windows_cross_target": "x86_64-pc-windows-gnu", |
| 17 | 17 | "windows_runtime_tested": false, |
| @@ -542,6 +542,22 @@ | ||
| 542 | 542 | "baseline": "Fails: the notice is outside the visible list content area after the expanding ScrollArea.", |
| 543 | 543 | "baseline_log_sha256": "53c59d86aceb87ae7db157629779e5c830ef1a1291131d748c2ee83291159db8", |
| 544 | 544 | "fixed": "Passed: notice stays between list header and status bar, count is zero and no extra worker request starts." |
| 545 | 추가: }, | |
| 546 | 추가: "windows_worker_paths": { | |
| 547 | 추가: "conversion": "Only unambiguous verbatim drive paths become ordinary drive paths. All five adapter path fields share this conversion. UNC, devices, parent traversal, alternate streams, reserved names and ambiguous components remain unchanged for worker rejection.", | |
| 548 | 추가: "linux_tests": [ | |
| 549 | 추가: "ordinary_verbatim_drives_are_converted_without_changing_components", | |
| 550 | 추가: "unc_devices_and_ambiguous_components_remain_blocked", | |
| 551 | 추가: "creation_messages_use_save_vocabulary_and_preserve_warnings", | |
| 552 | 추가: "failed_zip_creation_shows_save_location_and_no_extraction_copy" | |
| 553 | 추가: ], | |
| 554 | 추가: "windows_cross_compiled_tests": [ | |
| 555 | 추가: "windows_native_contract_accepts_drives_and_still_rejects_unc", | |
| 556 | 추가: "all_worker_path_fields_use_the_same_safe_drive_conversion", | |
| 557 | 추가: "create_zip_reopen_and_extract_via_actual_widgets_and_worker", | |
| 558 | 추가: "cold_start_creates_aes_zip_then_reopens_and_extracts_with_password" | |
| 559 | 추가: ], | |
| 560 | 추가: "worker_contract": "Revision 2 and worker implementation unchanged; existing source link checks and publication-warning conditions retained." | |
| 545 | 561 | } |
| 546 | 562 | }, |
| 547 | 563 | "licenses": { |
| @@ -579,7 +595,7 @@ | ||
| 579 | 595 | "packaging": "Existing Windows and Ubuntu packaging entrypoints generate THIRD-PARTY-LICENSES.txt from the updated lockfiles. Installer execution and package runtime were not tested in this change." |
| 580 | 596 | }, |
| 581 | 597 | "limitations": [ |
| 582 | 삭제: "Windows cross-build only; the new UI, installation and native dialog interaction have not been executed on Windows.", | |
| 598 | 추가: "Windows all-target cross-build passed, including the Windows-specific contract tests and normal/AES creation flows. This correction has not been executed on Windows; a new installer VM run remains required.", | |
| 583 | 599 | "Linux native backend failure is exercised through a child process and Xvfb. Successful portal selection and actual user cancellation interaction remain untested; their response handling has unit and injected UI coverage.", |
| 584 | 600 | "Xvfb images use synthetic listing data; real file operations are separately tested with the actual worker.", |
| 585 | 601 | "Full assistive-technology audit and actual OS file-manager launching are not included." |
| @@ -609,7 +625,9 @@ | ||
| 609 | 625 | ], |
| 610 | 626 | "portal_failure_screenshot_scope": "Actual eframe and NativeDialogs Linux backend with an unreachable private D-Bus address and synthetic archive listing. Success-path portal interaction is not covered.", |
| 611 | 627 | "validation_notes": [ |
| 612 | 삭제: "The empty-list regression failed before the correction and passed afterwards for three states. The complete local command passed on the corrected source. Build caches were removed after verification; source, Git data, test logs and toolchains remain." | |
| 628 | 추가: "Earlier screenshot and cache-cleanup fields are historical evidence from PR90 and PR91; no new screenshots or cache cleanup were performed for this correction.", | |
| 629 | 추가: "Initial checks found a missing test-adapter module import and an old creation warning expectation. Both were corrected; the targeted UI suite (73 tests) and the final complete local command passed.", | |
| 630 | 추가: "The final source validation is followed only by this evidence update." | |
| 613 | 631 | ], |
| 614 | 632 | "long_layout_screenshots_source_local_commit": "2228c846a91d10f82051fac5cf80d25fb4ea132f", |
| 615 | 633 | "long_layout_screenshots": [ |
| @@ -655,6 +673,7 @@ | ||
| 655 | 673 | "total_reclaimed_bytes": 69957828608, |
| 656 | 674 | "available_bytes_after_cleanup": 83569205248, |
| 657 | 675 | "active_cache_processes": [], |
| 658 | 삭제: "scope": "Only own generated build cache under tests/rw/tests/ci/target; source, Git data, logs and toolchains retained." | |
| 676 | 추가: "scope": "Only own generated build cache under tests/rw/tests/ci/target; source, Git data, logs and toolchains retained.", | |
| 677 | 추가: "historical": true | |
| 659 | 678 | } |
| 660 | 679 | } |