Skip to content

Commit 025caaf

Browse files
committed
Improve: Create 'Wine' folder/key in registry if doesn't already exist for unhiding files.
1 parent d8c6620 commit 025caaf

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

source/Reloaded.Mod.Installer.Lib/MainWindowViewModel.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -390,9 +390,8 @@ private static void ShowDotFilesInWine()
390390
{
391391
try
392392
{
393-
using RegistryKey key = Registry.CurrentUser.OpenSubKey(@"Software\Wine", true)!;
394-
// Set the ShowDotFiles value to "Y"
395-
key.SetValue("ShowDotFiles", "Y", RegistryValueKind.String);
393+
using RegistryKey? key = Registry.CurrentUser.CreateSubKey(@"Software\Wine");
394+
key!.SetValue("ShowDotFiles", "Y", RegistryValueKind.String);
396395
Console.WriteLine("Successfully set ShowDotFiles to Y in the Wine registry.");
397396
}
398397
catch (Exception)

0 commit comments

Comments
 (0)