From b5099854af2195bd209363cf257f5de4fb09e672 Mon Sep 17 00:00:00 2001 From: fyears <1142836+fyears@users.noreply.github.com> Date: Sun, 28 Jul 2024 15:50:01 +0800 Subject: [PATCH] webdis add prefix in scan --- src/fsWebdis.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/fsWebdis.ts b/src/fsWebdis.ts index 9c6b07f..9ab69e5 100644 --- a/src/fsWebdis.ts +++ b/src/fsWebdis.ts @@ -117,7 +117,7 @@ export class FakeFsWebdis extends FakeFs { let cursor = "0"; const res: Entity[] = []; do { - const command = `SCAN/${cursor}/MATCH/rs:fs:v1:*:meta/COUNT/1000`; + const command = `SCAN/${cursor}/MATCH/rs:fs:v1:${encodeURIComponent(this.remoteBaseDir + "/")}*:meta/COUNT/1000`; const rsp = (await (await this._fetchCommand("GET", command)).json())[ "SCAN" ]; @@ -136,7 +136,7 @@ export class FakeFsWebdis extends FakeFs { async walkPartial(): Promise { let cursor = "0"; const res: Entity[] = []; - const command = `SCAN/${cursor}/MATCH/rs:fs:v1:*:meta/COUNT/10`; // fewer keys + const command = `SCAN/${cursor}/MATCH/rs:fs:v1:${encodeURIComponent(this.remoteBaseDir + "/")}*:meta/COUNT/10`; // fewer keys const rsp = (await (await this._fetchCommand("GET", command)).json())[ "SCAN" ];