From 11ab4a7935d67c7afc903cbdbe02f586e479c2c9 Mon Sep 17 00:00:00 2001 From: IceReaper Date: Tue, 4 Apr 2023 15:01:20 +0200 Subject: [PATCH] Support dos paths in registry. --- .../SourceResolvers/RegistryDirectorySourceResolver.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/OpenRA.Mods.Common/Installer/SourceResolvers/RegistryDirectorySourceResolver.cs b/OpenRA.Mods.Common/Installer/SourceResolvers/RegistryDirectorySourceResolver.cs index 7ea09f6f30..3f167a7402 100644 --- a/OpenRA.Mods.Common/Installer/SourceResolvers/RegistryDirectorySourceResolver.cs +++ b/OpenRA.Mods.Common/Installer/SourceResolvers/RegistryDirectorySourceResolver.cs @@ -9,6 +9,7 @@ */ #endregion +using System.IO; using System.Runtime.InteropServices; 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)) continue; + // Resolve 8.3 format (DOS-style) paths to the full path. + path = Path.GetFullPath(path); + return InstallerUtils.IsValidSourcePath(path, source) ? path : null; }