Support dos paths in registry.

This commit is contained in:
IceReaper
2023-04-04 15:01:20 +02:00
committed by abcdefg30
parent 4dd532f60e
commit 11ab4a7935

View File

@@ -9,6 +9,7 @@
*/ */
#endregion #endregion
using System.IO;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
namespace OpenRA.Mods.Common.Installer namespace OpenRA.Mods.Common.Installer
@@ -33,6 +34,9 @@ namespace OpenRA.Mods.Common.Installer
if (!(Microsoft.Win32.Registry.GetValue(prefix + source.RegistryKey, source.RegistryValue, null) is string path)) if (!(Microsoft.Win32.Registry.GetValue(prefix + source.RegistryKey, source.RegistryValue, null) is string path))
continue; continue;
// Resolve 8.3 format (DOS-style) paths to the full path.
path = Path.GetFullPath(path);
return InstallerUtils.IsValidSourcePath(path, source) ? path : null; return InstallerUtils.IsValidSourcePath(path, source) ? path : null;
} }