We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 27968a1 commit f0a6167Copy full SHA for f0a6167
src/Files.App/Utils/Global/WSLDistroManager.cs
@@ -28,6 +28,14 @@ public static async Task UpdateDrivesAsync()
28
{
29
try
30
31
+ // Check if WSL is installed
32
+ const string WslRegistryPath = @"SOFTWARE\Microsoft\Windows\CurrentVersion\Lxss";
33
+ using (var key = Microsoft.Win32.Registry.LocalMachine.OpenSubKey(WslRegistryPath))
34
+ {
35
+ if (key != null && key.GetSubKeyNames().Length == 0)
36
+ return;
37
+ }
38
+
39
var distroFolder = await StorageFolder.GetFolderFromPathAsync(@"\\wsl$\");
40
foreach (StorageFolder folder in await distroFolder.GetFoldersAsync())
41
0 commit comments