Skip to content

Make Walk spec compliant, mainly to return partial walks#11

Open
ramblingenzyme wants to merge 3 commits into
knusbaum:masterfrom
ramblingenzyme:fix-walk-impl
Open

Make Walk spec compliant, mainly to return partial walks#11
ramblingenzyme wants to merge 3 commits into
knusbaum:masterfrom
ramblingenzyme:fix-walk-impl

Conversation

@ramblingenzyme

Copy link
Copy Markdown

the original Walk implementation didn't return partial results, which meant trying to copy a file into a directory caused a Walk failure which aborted the copy command.

The fixes are as follows:

  • Rerror is only returned if the first element can't be walked, and partial results get returned otherwise as per spec
  • handling .. within Wname, e.g. ["dir", "..", "sibling"]
  • add check for the fid being open, newfid already being used

Breaking change:

  • WalkFail now only gets called if the dir it would be added to is modifiable. While I can revert this, it would add back in the edge case of the file not being able to be attached to the FS tree.

https://ericvh.github.io/9p-rfc/rfc9p2000.html was where I referenced the spec from, and full disclosure, Claude was used to help me implement this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant