New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace FindFirstFileExW with FindFirstFileW #16840
Replace FindFirstFileExW with FindFirstFileW #16840
Conversation
@@ -8278,7 +8280,7 @@ internal static bool IsReparsePointLikeSymlink(FileSystemInfo fileInfo) | |||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can the structs FINDEX_INFO_LEVELS
and FINDEX_SEARCH_OPS
be removed now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
,.ps1
and.psm1
files have the correct copyright headerWIP:
or[ WIP ]
to the beginning of the title (theWIP
bot will keep its status check atPending
while the prefix is present) and remove the prefix when the PR is ready.(which runs in a different PS Host).