Skip to content

Commit 2bc981a

Browse files
committed
fix(files): state the path resolver's concealment accurately; restore takes no path flag
1 parent 718818b commit 2bc981a

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎apps/sim/lib/workspace-files/application/file-context.ts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@ function requireWorkspaceFileContext<C extends ActiveWorkspaceFileContext>(
8888

8989
/**
9090
* A path becomes an id first, so the canonical load and every authorization check run unchanged.
91-
* It runs before authorization, so a missing and an ambiguous path both answer exactly as the
92-
* concealed authorization failure does: the reply says nothing about another workspace's files.
91+
* Like that load, it runs before authorization, so a missing and an ambiguous path both answer
92+
* `not_found`, the answer the v2 surface also gives for a file the caller cannot reach.
9393
*/
9494
async function resolveFileId(input: WorkspaceFileContextInput): Promise<string> {
9595
if (!input.acceptVfsPath || !isWorkspaceFileVfsPath(input.fileId)) return input.fileId
@@ -122,7 +122,7 @@ export async function resolveActiveWorkspaceFileContext(
122122
}
123123

124124
export async function resolveWorkspaceFileLifecycleContext(
125-
input: WorkspaceFileContextInput
125+
input: Omit<WorkspaceFileContextInput, 'acceptVfsPath'>
126126
): Promise<WorkspaceFileLifecycleContext> {
127127
return requireWorkspaceFileContext(
128128
await loadWorkspaceFileLifecycleContext(input.fileId),

0 commit comments

Comments
 (0)