Replace FindFirstFileExW with FindFirstFileW#16840
Replace FindFirstFileExW with FindFirstFileW#16840daxian-dbw merged 4 commits intoPowerShell:masterfrom
Conversation
| fullPath = PathUtils.EnsureExtendedPrefix(fullPath); | ||
| } | ||
|
|
||
| using (SafeFindHandle handle = FindFirstFileEx(fullPath, FINDEX_INFO_LEVELS.FindExInfoBasic, ref data, FINDEX_SEARCH_OPS.FindExSearchNameMatch, IntPtr.Zero, 0)) |
There was a problem hiding this comment.
Can the structs FINDEX_INFO_LEVELS and FINDEX_SEARCH_OPS be removed now?
There was a problem hiding this comment.
They have been used for so long that one wonders if they will be needed again. :-)
They don't increase the size of the binaries, so I decided to leave them in until we were sure that .Net did what we needed.
There was a problem hiding this comment.
It's better to remove all if they are not in use anymore. If for some reason we need to revert this change, all will be reverted back anyways.
There was a problem hiding this comment.
I am exploring now how we can make our providers better in particular File Provider and may need it again. I don't mind removing it for now though.
|
This PR has Quantification details
Why proper sizing of changes matters
Optimal pull request sizes drive a better predictable PR flow as they strike a
What can I do to optimize my changes
How to interpret the change counts in git diff output
Was this comment helpful? 👍 :ok_hand: :thumbsdown: (Email) |
|
Great job! Shall I correctly infer that this will surface in the next What about the OS bug? Will you guys report it "there"? |
|
@sba923 You can subscribe to .Net issue dotnet/runtime#64789 to track news about the API issue. The fix will be in next PowerShell 7.3 Preview2. As for backport to LTS version, I guess MSFT team will weight. Personally I don't see needs to backport the fix since it is rare scenario. |
Switch issue/PR fragments to use the timeline API in order to get that event.
|
🎉 Handy links: |
|
@PowerShell/powershell-maintainers |
PR Summary
Fix #16804
Test would be very slow so I added protection comment in the code since no functional changes was done.
PR Context
PR Checklist
.h,.cpp,.cs,.ps1and.psm1files have the correct copyright headerWIP:or[ WIP ]to the beginning of the title (theWIPbot will keep its status check atPendingwhile the prefix is present) and remove the prefix when the PR is ready.(which runs in a different PS Host).