dotnet/runtime

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

Open

#1.585 aberto em 29 de out. de 2019

Ver no GitHub
 (0 comments) (0 reactions) (0 assignees)C# (5.445 forks)batch import
area-System.IOhelp wanted

Métricas do repositório

Stars
 (17.886 stars)
Métricas de merge de PR
 (Mesclagem média 12d 11h) (661 fundiu PRs em 30d)

Description

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.

Guia do colaborador