From f306445e0d3c94027abb5e0f326389ece8c52838 Mon Sep 17 00:00:00 2001 From: fyears <1142836+fyears@users.noreply.github.com> Date: Fri, 28 Jun 2024 23:05:22 +0800 Subject: [PATCH] save resources --- src/fsEncrypt.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/fsEncrypt.ts b/src/fsEncrypt.ts index ed06da6..097a1d0 100644 --- a/src/fsEncrypt.ts +++ b/src/fsEncrypt.ts @@ -91,7 +91,8 @@ export class FakeFsEncrypt extends FakeFs { this.password !== "" ? method : "no password" })`; - if (method === "rclone-base64") { + if (this.password !== "" && method === "rclone-base64") { + // no need to init if no password or not rclone this.cipherRClone = new rclone.CipherRclone(password, 5); } } @@ -137,6 +138,8 @@ export class FakeFsEncrypt extends FakeFs { }; } } else { + // the config has a password + if (this.method === "unknown") { return { ok: false,