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
Query the CurrentDirectoryPath of a wsl.exe (or powershell.exe) process. I do this via NtQueryInformationProcess, which, I know, is an internal API. I'd assume the behaviour would be the same via injection + GetCurrentDirectory (not an internal API) though.
Expected Behavior
CurrentDirectoryPath should change according to the path I navigate to. This is the case with cmd.exe but not wsl.exe (or powershell.exe).
Actual Behavior
CurrentDirectoryPath stays at the starting directory.
I'll attach a video, demonstrating the behaviour:
2022-12-26_22-42-33.mp4
Diagnostic Logs
No response
The text was updated successfully, but these errors were encountered:
What you're seeing is expected because wsl.exe's current directory is not correlated to the Linux's current directory inside WSL.
In other words, doing cd * inside wsl.exe doesn't change wsl.exe's current directory.
Version
Microsoft Windows [Version 10.0.22621.525]
WSL Version
Kernel Version
Linux version 5.15.79.1-microsoft-standard-WSL2
Distro Version
Ubuntu 22.04
Other Software
No response
Repro Steps
Query the CurrentDirectoryPath of a wsl.exe (or powershell.exe) process. I do this via NtQueryInformationProcess, which, I know, is an internal API. I'd assume the behaviour would be the same via injection + GetCurrentDirectory (not an internal API) though.
Expected Behavior
CurrentDirectoryPath should change according to the path I navigate to. This is the case with cmd.exe but not wsl.exe (or powershell.exe).
Actual Behavior
CurrentDirectoryPath stays at the starting directory.
I'll attach a video, demonstrating the behaviour:
2022-12-26_22-42-33.mp4
Diagnostic Logs
No response
The text was updated successfully, but these errors were encountered: