Skip to content

Confirm legacy behavior (NT5) still applies to current SafeFileHandle creation code #1585

@carlossanlop

Description

@carlossanlop

This PR will reintroduce code coming from .NET Framework. It will contain a comment explaining behavior from Windows 2000. The comment says:

NT5 oddity - when trying to open "C:" as a FileStream. We usually get ERROR_PATH_NOT_FOUND from the OS. We should probably be consistent w/ every other directory.

@JeremyKuhne 's request is to reconfirm and reinvestigate this behavior:

Just an aside- it would be nice to investigate and rewrite this comment as a follow up. For one NT5 is Windows 2000, but I don't think we need to even call that out. It would be good to validate what this thing is asserting and just comment on trying to be consistent and that we did this historically (e.g. retaining for compat).

Link to comment for full context:
https://github.com/dotnet/corefx/pull/42099/files/b847fe477abe89c0daf2c73c6d263596a7f6486b#r340219065

Opening this separate issue to unblock that PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-System.IOhelp wanted[up-for-grabs] Good issue for external contributors

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions