Skip to content

hardcoded win32 MAX_PATH check in LogicalStorageDevice #951

@mgrandi

Description

@mgrandi

if (filename.Length > Native32.WIN32_MAX_PATH - 11) // -11 to allow for ".<segment>"

We just hit this in our use case, where the machine has the extended max path registry key set, but we were still getting this, I looked at the class and it looks like it is throwing an exception if the path is > 260 characters, even with the registry key set

with this, even if you manually specify the special syntax to get win32 to use a extended path \\?\C:\some\path\here won't work

https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=registry

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions