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