diff --git a/common/spaces/plug_space_primitives.ts b/common/spaces/plug_space_primitives.ts index 169f0201..fa63c955 100644 --- a/common/spaces/plug_space_primitives.ts +++ b/common/spaces/plug_space_primitives.ts @@ -48,8 +48,11 @@ export class PlugSpacePrimitives implements SpacePrimitives { async fetchFileList(): Promise { const allFiles: FileMeta[] = []; - for (const { plug, name, operation } of this.hook.spaceFunctions) { - if (operation === "listFiles") { + for (const { plug, name, operation, env } of this.hook.spaceFunctions) { + if ( + operation === "listFiles" && (!this.env || (env && env === this.env)) + ) { + console.log("Going to run this", this.env, env, name, operation); try { for (const pm of await plug.invoke(name, [])) { allFiles.push(pm); diff --git a/web/client.ts b/web/client.ts index 4d572cd6..9663ca3a 100644 --- a/web/client.ts +++ b/web/client.ts @@ -343,6 +343,7 @@ export class Client { this.plugSpaceRemotePrimitives = new PlugSpacePrimitives( this.remoteSpacePrimitives, this.system.namespaceHook, + this.syncMode ? undefined : "client", ); let fileFilterFn: (s: string) => boolean = () => true;