恢复 lib 对于文件的移动操作
This commit is contained in:
parent
fb65524866
commit
9562b4ece1
@ -103,34 +103,31 @@ class LibManage {
|
|||||||
del.push(...this.curr.list);
|
del.push(...this.curr.list);
|
||||||
|
|
||||||
// copy file from remote to local
|
// copy file from remote to local
|
||||||
|
const remotePathList = this.getLibFiles(LibraryState.Remote);
|
||||||
// TODO: 从新版本删除所有涉及删除的功能
|
this.remote2Local(remotePathList, (src, dist) => {
|
||||||
// const remotePathList = this.getLibFiles(LibraryState.Remote);
|
hdlParam.deleteHdlFile(src);
|
||||||
// this.remote2Local(remotePathList, (src, dist) => {
|
hdlFile.copyFile(src, dist);
|
||||||
// hdlParam.deleteHdlFile(src);
|
});
|
||||||
// hdlFile.copyFile(src, dist);
|
|
||||||
// });
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case 'local-remote':
|
case 'local-remote':
|
||||||
add.push(...this.next.list);
|
add.push(...this.next.list);
|
||||||
|
|
||||||
// TODO: 从新版本删除所有涉及删除的功能
|
// delete local files & data structure in hdlParam (async)
|
||||||
// // delete local files & data structure in hdlParam (async)
|
await this.deleteLocalFiles();
|
||||||
// await this.deleteLocalFiles();
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case 'local-local':
|
case 'local-local':
|
||||||
add.push(...diffElement(this.next.list, this.curr.list));
|
add.push(...diffElement(this.next.list, this.curr.list));
|
||||||
del.push(...diffElement(this.curr.list, this.next.list));
|
del.push(...diffElement(this.curr.list, this.next.list));
|
||||||
|
|
||||||
// this.remote2Local(add, (src, dist) => {
|
this.remote2Local(add, (src, dist) => {
|
||||||
// hdlFile.copyFile(src, dist);
|
hdlFile.copyFile(src, dist);
|
||||||
// });
|
});
|
||||||
|
|
||||||
// this.remote2Local(del, (src, dist) => {
|
this.remote2Local(del, (src, dist) => {
|
||||||
// hdlFile.removeFile(dist);
|
hdlFile.removeFile(dist);
|
||||||
// });
|
});
|
||||||
break;
|
break;
|
||||||
default: break;
|
default: break;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user