From 9562b4ece191c81c6c5bee148cc296bd60389e92 Mon Sep 17 00:00:00 2001 From: Kirigaya <1193466151@qq.com> Date: Mon, 28 Oct 2024 13:17:42 +0800 Subject: [PATCH] =?UTF-8?q?=E6=81=A2=E5=A4=8D=20lib=20=E5=AF=B9=E4=BA=8E?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E7=9A=84=E7=A7=BB=E5=8A=A8=E6=93=8D=E4=BD=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/manager/lib.ts | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/src/manager/lib.ts b/src/manager/lib.ts index d5988b7..7f7c86a 100644 --- a/src/manager/lib.ts +++ b/src/manager/lib.ts @@ -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; }