| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
There was a problem hiding this comment.
Dongbo Wang (@daxian-dbw) Since you refactor the code why not remove Platform.IsWindows() and put code under #if?
Sorry, something went wrong.
Ilya (@iSazonov) That's not a goal of this PR :) |
Sorry, something went wrong.
|
Ilya (@iSazonov) I made some updates based on your comments. Please take another look when you have time, thanks! |
Sorry, something went wrong.
…oints to `FileSystemInfo.LinkTarget` (PowerShell#16165)
|
🎉v7.2.0-rc.1 has been released which incorporates this pull request.:tada: Handy links: |
Sorry, something went wrong.
|
🎉v7.3.0-preview.1 has been released which incorporates this pull request.:tada: Handy links: |
Sorry, something went wrong.
…oints to `FileSystemInfo.LinkTarget` (PowerShell#16165)
…oints to `FileSystemInfo.LinkTarget` (PowerShell#16165)
| Back | FazBrowse Home | New Git URL |
PR Summary
Fix #15958
Fix #13365
Change Target from a CodeProperty to be an AliasProperty that points to FileSystemInfo.LinkTarget.
Also, keep the public API InternalSymbolicLinkLinkCodeMethods.GetTarget(PSObject instance), but use FileSystemInfo.LinkTarget inside.
I have reviewed the .NET implementation of LinkTarget, and can confirm that the functionality is in parity.
The only difference is that LinkTarget doesn't throw error when the file doesn't exist, but our GetTarget(...) throws exception in that case. So, I add the file-existence check at some places, and other places doesn't need the check.
It would be easier to review by ignoring the white-space changes:
https://github.com/PowerShell/PowerShell/pull/16165/files?w=1
PR Context
PR Checklist