Skip to content

feat(vz): canonicalize directory share names in Go - #285

Merged
Code-Hex merged 3 commits into
mainfrom
codex/canonicalize-directory-name
Oct 27, 2026
Merged

Code-Hex merged 3 commits into
mainfrom
codex/canonicalize-directory-name

Conversation

@Code-Hex

@Code-Hex Code-Hex commented Oct 27, 2026 •

Copy link
Copy Markdown
Owner

Add CanonicalizeDirectoryShareName as a Go implementation of Apple's directory share name conversion. It discards the first NUL byte and everything after it, removes unsupported ASCII characters, and rejects empty, reserved, or overlong names.

After validation, it removes one leading byte order mark (U+FEFF), matching Apple's string conversion. This last step can produce an empty name, ".", or ".." without an error. NewMultipleDirectoryShare still validates the result and rejects these names.

Different inputs can produce the same name. Callers handle collisions before adding names to a share map.

@Code-Hex
Code-Hex merged commit b7de488 into main Oct 27, 2026
12 of 13 checks passed
@Code-Hex
Code-Hex deleted the codex/canonicalize-directory-name branch October 27, 2026 14:52
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