Improve detection of portable MPC-HC

This commit is contained in:
mkver 2018-04-29 18:42:57 +02:00 committed by GitHub
parent 99a7a00d63
commit 246e79ceba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -286,7 +286,7 @@ namespace Nikse.SubtitleEdit.Logic.VideoPlayers.MpcHC
if (!string.IsNullOrEmpty(Configuration.Settings.General.MpcHcLocation))
{
path = Path.GetDirectoryName(Configuration.Settings.General.MpcHcLocation);
path = Configuration.Settings.General.MpcHcLocation;
if (path != null && (File.Exists(path) && path.EndsWith("mpc-hc64.exe", StringComparison.OrdinalIgnoreCase)))
return path;
if (Directory.Exists(Configuration.Settings.General.MpcHcLocation))
@ -340,7 +340,7 @@ namespace Nikse.SubtitleEdit.Logic.VideoPlayers.MpcHC
if (!string.IsNullOrEmpty(Configuration.Settings.General.MpcHcLocation))
{
path = Path.GetDirectoryName(Configuration.Settings.General.MpcHcLocation);
path = Configuration.Settings.General.MpcHcLocation;
if (path != null && File.Exists(path) && path.EndsWith("mpc-hc.exe", StringComparison.OrdinalIgnoreCase))
return path;
if (Directory.Exists(Configuration.Settings.General.MpcHcLocation))