Skip to content

Commit 80393c0

Browse files
iSazonovkilasuit
authored andcommitted
Read special reparse points without accessing it (PowerShell#10662)
* Enhance enum FileDesiredAccess with zero value GenericZero * Use the GenericZero as desired access mode to read reparse point without access it From docs: If desired access is zero, the application can query certain metadata such as file, directory, or device attributes without accessing that file or device, even if GENERIC_READ access would have been denied
1 parent 8bc670d commit 80393c0

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

test/powershell/Modules/Microsoft.PowerShell.Management/Get-Item.Tests.ps1

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,6 @@ Describe "Get-Item" -Tags "CI" {
6161
$result.Exists | Should -BeTrue
6262
}
6363

64-
It "Should return correct result for ToString() on root of drive" {
65-
$root = $IsWindows ? "${env:SystemDrive}\" : "/"
66-
(Get-Item -Path $root).ToString() | Should -BeExactly $root
67-
}
68-
6964
Context "Test for Include, Exclude, and Filter" {
7065
BeforeAll {
7166
${testBaseDir} = "${TESTDRIVE}/IncludeExclude"

0 commit comments

Comments
 (0)