Skip to content

Commit b2a7894

Browse files
authored
Fix: Fixed an issue where a WSL prompt would sometimes display on startup (#16462)
1 parent cc2586e commit b2a7894

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Files.App/Utils/Global/WSLDistroManager.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ public static async Task UpdateDrivesAsync()
2929
try
3030
{
3131
// Check if WSL is installed
32-
const string WslRegistryPath = @"SOFTWARE\Microsoft\Windows\CurrentVersion\Lxss";
32+
const string WslRegistryPath = @"SOFTWARE\Microsoft\Windows\CurrentVersion\Lxss\MSI";
3333
using (var key = Microsoft.Win32.Registry.LocalMachine.OpenSubKey(WslRegistryPath))
3434
{
35-
if (key != null && key.GetSubKeyNames().Length == 0)
35+
if (key is null || key.GetValue("InstallLocation") is null)
3636
return;
3737
}
3838

0 commit comments

Comments
 (0)