From 487d955a9952732ae6ac8d6da30ecbe55f21c57f Mon Sep 17 00:00:00 2001 From: RyuJongJin <266630912+RyuJongJin@users.noreply.github.com> Date: Sun, 11 Oct 2026 23:05:49 +0900 Subject: [PATCH] =?UTF-8?q?Rsync=20=ED=99=94=EB=A9=B4=EC=9D=80=20rsync=20?= =?UTF-8?q?=EB=A1=9C=20=C2=B7=20lsync=20=EB=A1=9C=20=EC=98=AE=EA=B8=B8=20?= =?UTF-8?q?=EB=95=8C=20=EC=9D=B4=EB=8F=99=20=EC=9C=A0=EC=A7=80=20(218=20?= =?UTF-8?q?=C2=B7=20219)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 218 (버그): Rsync 화면에서 만든 작업이 기억된 다른 방법으로 돌던 것 - 늘 rsync 로 - 219 (버그): 모니터링에서 lsync 로 옮길 때 이동 · 안의 것 · 원본 정리 · 한 번에를 그대로 넘김 Co-Authored-By: Claude Opus 5.5 --- lib/app/copy_center.dart | 13 ++++++++++++- lib/ui/explorer_page.dart | 3 ++- test/monitor_test.dart | 11 +++++++++++ 3 files changed, 25 insertions(+), 2 deletions(-) diff --git a/lib/app/copy_center.dart b/lib/app/copy_center.dart index 97cd278..640b5f6 100644 --- a/lib/app/copy_center.dart +++ b/lib/app/copy_center.dart @@ -170,7 +170,18 @@ class CopyCenter extends ChangeNotifier { if (y.id != t.id) y else if (rest.isNotEmpty) - CopyTask(id: y.id, sources: rest, dest: y.dest, method: y.method, options: y.options, bandwidthKBps: y.bandwidthKBps), + // 219: 이동 · 안의 것 · 원본 정리 · 한 번에 도 그대로 (빠뜨리면 다시 실행할 때 복사로 바뀌었다) + CopyTask( + id: y.id, + sources: rest, + dest: y.dest, + method: y.method, + options: y.options, + bandwidthKBps: y.bandwidthKBps, + move: y.move, + contents: y.contents, + prune: y.prune, + once: y.once), ]); notifyListeners(); return pairs.length; diff --git a/lib/ui/explorer_page.dart b/lib/ui/explorer_page.dart index e8c44bc..660f8e1 100644 --- a/lib/ui/explorer_page.dart +++ b/lib/ui/explorer_page.dart @@ -2243,7 +2243,8 @@ class _ExplorerPageState extends State { final jobs = []; for (var i = 0; i < run.length; i++) { c.note(trf('rsync 시작 ({0}): {1} → {2}', [tr('Rsync 화면 확인 창의 [실행]'), run[i].sources.first, run[i].dest])); - final j = await center.start(run[i].copyWith(options: shownOpts[i]), rsyncExe: dav ? null : exe); + // 218: Rsync 화면은 rsync 로 (기억한 작업의 방법을 모니터링에서 바꿨어도 - 확인 창에 보인 그대로. WebDAV 가 끼면 앱이 직접) + final j = await center.start(run[i].copyWith(options: shownOpts[i], method: 'rsync'), rsyncExe: dav ? null : exe); if (!mounted) break; if (j == null) { // 205: 시작하지 못하면 이유를 알린다 (예전에는 알림 없이 끝나 "이동이 안 됨" 으로만 보였다) diff --git a/test/monitor_test.dart b/test/monitor_test.dart index 0e16449..29431b5 100644 --- a/test/monitor_test.dart +++ b/test/monitor_test.dart @@ -83,6 +83,17 @@ void main() { expect(Directory(src).listSync(recursive: true).whereType(), isEmpty, reason: '원본의 파일은 옮겨짐'); }); + test('219: 파일이 섞인 이동 작업을 lsync 로 옮기면 남는 작업 (파일) 은 이동 · 원본 정리 · 한 번에 를 그대로', () async { + final single = File(p.join(tmp.path, 'single.txt'))..writeAsStringSync('s'); + final center = CopyCenter(c); + final t = CopyTask(id: '9', sources: [src, single.path], dest: dst, move: true, method: 'rsync', prune: 'all', once: true); + await c.updateSettings((x) => x.copyTasks = [t]); + expect(await center.toLiveSync(center.tasks.single), 1); + final rest = center.tasks.single; + expect(rest.sources, [single.path]); + expect([rest.move, rest.prune, rest.once, rest.method], [true, 'all', true, 'rsync']); + }); + test('같은 복사는 기억한 옵션 · 실행 결과 기록 · lsync 로 이동 · 다시 복사 목록으로', () async { c.settings.copyMethodFolder = 'builtin'; // rsync 실행은 sync_tools_test (시험 환경에서는 path_provider 없음) final center = CopyCenter(c);