Rsync 화면은 rsync 로 · lsync 로 옮길 때 이동 유지 (218 · 219)
- 218 (버그): Rsync 화면에서 만든 작업이 기억된 다른 방법으로 돌던 것 - 늘 rsync 로 - 219 (버그): 모니터링에서 lsync 로 옮길 때 이동 · 안의 것 · 원본 정리 · 한 번에를 그대로 넘김 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>fix_mkv
parent
c0397e9fe1
commit
487d955a99
|
|
@ -170,7 +170,18 @@ class CopyCenter extends ChangeNotifier {
|
||||||
if (y.id != t.id)
|
if (y.id != t.id)
|
||||||
y
|
y
|
||||||
else if (rest.isNotEmpty)
|
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();
|
notifyListeners();
|
||||||
return pairs.length;
|
return pairs.length;
|
||||||
|
|
|
||||||
|
|
@ -2243,7 +2243,8 @@ class _ExplorerPageState extends State<ExplorerPage> {
|
||||||
final jobs = <TransferJob>[];
|
final jobs = <TransferJob>[];
|
||||||
for (var i = 0; i < run.length; i++) {
|
for (var i = 0; i < run.length; i++) {
|
||||||
c.note(trf('rsync 시작 ({0}): {1} → {2}', [tr('Rsync 화면 확인 창의 [실행]'), run[i].sources.first, run[i].dest]));
|
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 (!mounted) break;
|
||||||
if (j == null) {
|
if (j == null) {
|
||||||
// 205: 시작하지 못하면 이유를 알린다 (예전에는 알림 없이 끝나 "이동이 안 됨" 으로만 보였다)
|
// 205: 시작하지 못하면 이유를 알린다 (예전에는 알림 없이 끝나 "이동이 안 됨" 으로만 보였다)
|
||||||
|
|
|
||||||
|
|
@ -83,6 +83,17 @@ void main() {
|
||||||
expect(Directory(src).listSync(recursive: true).whereType<File>(), isEmpty, reason: '원본의 파일은 옮겨짐');
|
expect(Directory(src).listSync(recursive: true).whereType<File>(), 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 {
|
test('같은 복사는 기억한 옵션 · 실행 결과 기록 · lsync 로 이동 · 다시 복사 목록으로', () async {
|
||||||
c.settings.copyMethodFolder = 'builtin'; // rsync 실행은 sync_tools_test (시험 환경에서는 path_provider 없음)
|
c.settings.copyMethodFolder = 'builtin'; // rsync 실행은 sync_tools_test (시험 환경에서는 path_provider 없음)
|
||||||
final center = CopyCenter(c);
|
final center = CopyCenter(c);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue