Skip to main content
← Back to list
01Issue
BugShippedSwamp CLIPublic
Assigneeszack

Relationships

#4974 Hosted workspace create answers host_error, not already_exists, when a plain file holds the name in the workspace location

Opened by zack · 11/20/2026· Shipped 11/20/2026

Problem

When a serve host's root creates a workspace and a plain file (not a folder or link) already sits at /, the create fails with host_error instead of already_exists. checkNewWorkspaceFolder reads the target as a directory and the NotADirectory error is not a UserError, so createInLocation passes it through as an unexpected host failure.

A folder or a dangling link at the same path is answered already_exists as expected.

Reproduce

In src/libswamp/hosted_workspace/create_test.ts, write a file at join(host.location, 'edge-dns') and run hostedWorkspaceCreate for edge-dns: the error event's code is host_error, cause NotADirectory (os error 20).

Expected

already_exists with the name-taken message, as for a folder or a link, and nothing touched.

Where to look

  • src/libswamp/workspace/workspace_store.ts (checkNewWorkspaceFolder)
  • src/libswamp/hosted_workspace/create.ts (createInLocation)

swamp workspace create probably shares the same path.

02Bog Flow
✓OPEN✓TRIAGED✓IN PROGRESS✓SHIPPED+ 1 MOREASSIGNED+ 2 MOREREVIEW+ 6 MOREPR_LINKED+ 2 MORESESSION_SUMMARIZED

Shipped

11/20/2026, 10:48:41 PM

Click a lifecycle step above to view its details.

03Sludge Pulse
zack assigned zack11/20/2026, 10:12:28 PM

Sign in to post a ripple.