You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Tab completion under /mnt/c stymied by hiberfil.sys #7648
$error.Clear()
Import-Module/mnt/c/[tab][tab][tab][tab][tab][tab][tab]
#then clear the command line and run$error
Expected behavior
No problems, you just get tab completion for stuff under your C drive.
Actual behavior
You don't get any tab completion. For as many times as you hit [tab], you have an error like this in $error:
Exception calling "CompleteInput" with "3" argument(s): "Access to the path '/mnt/c/hiberfil.sys' is denied."
At line:38 char:16
+ ... return [System.Management.Automation.CommandCompletion]::Complet ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : UnauthorizedAccessException
Environment data
>$PSVersionTable
Name Value
---------
PSVersion 6.1.0-rc.1
PSEdition Core
GitCommitId 6.1.0-rc.1
OS Linux 4.4.0-17738-Microsoft #1000-Microsoft Fri Aug 10 17:06:00 PST 2018
Platform Unix
PSCompatibleVersions {1.0,2.0,3.0,4.0...}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
The files (pagefile.sys, hiberfil.sys, swapfile.sys) is locked by system and CoreFX can not read attributes of the files. We already get a CoreFX fix for Windows but it turned out that Unix code is also subject to this problem. It is my understanding the problem.
Activity
iSazonov commentedon Aug 31, 2018
Does
dir /mnt/c/work well and show the file and its properties? For Pagefile.sys?jazzdelightsme commentedon Sep 2, 2018
No; enumeration is halted (with an error) when it gets to
hiberfil.sys:DHowett commentedon Sep 6, 2018
The ability to see the attributes for hiberfil.sys should be gated on the traversal and read attributes on its parent folder.
That it is not suggests that powershell is opening files as it enumerates them.
Why is powershell doing that? Is that the actual bug here?
iSazonov commentedon Sep 7, 2018
The files (pagefile.sys, hiberfil.sys, swapfile.sys) is locked by system and CoreFX can not read attributes of the files. We already get a CoreFX fix for Windows but it turned out that Unix code is also subject to this problem. It is my understanding the problem.