save resources

This commit is contained in:
fyears 2024-06-28 23:05:22 +08:00
parent 54c25a70ed
commit f306445e0d

View File

@ -91,7 +91,8 @@ export class FakeFsEncrypt extends FakeFs {
this.password !== "" ? method : "no password" 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); this.cipherRClone = new rclone.CipherRclone(password, 5);
} }
} }
@ -137,6 +138,8 @@ export class FakeFsEncrypt extends FakeFs {
}; };
} }
} else { } else {
// the config has a password
if (this.method === "unknown") { if (this.method === "unknown") {
return { return {
ok: false, ok: false,