Skip to content

feat(winfsp): let Create and Open report the normalized file name - #32

Open
jaredeh wants to merge 1 commit into
winfsp:masterfrom
jaredeh:normalized-name
Open

jaredeh wants to merge 1 commit into
winfsp:masterfrom
jaredeh:normalized-name

Conversation

@jaredeh

@jaredeh jaredeh commented Oct 25, 2026

Copy link
Copy Markdown

The FileInfo that WinFsp passes to Create and Open points into an FSP_FSCTL_OPEN_FILE_INFO, whose NormalizedName buffer lets a file system report the name as it is stored when it was opened under another case. go-winfsp declares the struct but gives no way to reach or fill it, so a case-insensitive file system can't: WinFsp then keeps the name as it was opened, and reports that through GetFinalPathNameByHandle and FileNameInformation.

Add GetOpenFileInfo, the Go version of FspFileSystemGetOpenFileInfo, and FSP_FSCTL_OPEN_FILE_INFO.SetNormalizedName, which copies a name into WinFsp's buffer if it fits. A file system that doesn't call them is unaffected: WinFsp ignores an unset NormalizedName.

The FileInfo that WinFsp passes to Create and Open points into an
FSP_FSCTL_OPEN_FILE_INFO, whose NormalizedName buffer lets a file system
report the name as it is stored when it was opened under another case.
go-winfsp declares the struct but gives no way to reach or fill it, so a
case-insensitive file system can't: WinFsp then keeps the name as it
was opened, and reports that through GetFinalPathNameByHandle and
FileNameInformation.

Add GetOpenFileInfo, the Go version of FspFileSystemGetOpenFileInfo,
and FSP_FSCTL_OPEN_FILE_INFO.SetNormalizedName, which copies a name
into WinFsp's buffer if it fits. A file system that doesn't call them is
unaffected: WinFsp ignores an unset NormalizedName.
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