More detection fixes for issue #149

This commit is contained in:
Michael J. Seiferling
2018-08-31 08:54:54 -06:00
parent b04c1bc18b
commit 52c9fe506f
+7 -8
View File
@@ -218,14 +218,13 @@ Public Class mgrProcessDetection
'Unix Handler
'We need some special handling for Wine processes
If mgrCommon.IsUnix And (sProcessCheck.ToLower = "wine-preloader" Or sProcessCheck.ToLower = "wine64-preloader") Then
Dim sWinePath As String() = GetUnixProcessArguments(prsCurrent)
'The wine-preloader parameters can refer to a path on the host system or a windows based path within in the prefix, we need to handle both.
If sWinePath(0).Contains("\") Then
sWinePath = GetUnixProcessArguments(prsCurrent)(0).Split("\")
ElseIf sWinePath(0).Contains("/") Then
sWinePath = GetUnixProcessArguments(prsCurrent)(0).Split("/")
End If
sProcessCheck = sWinePath(sWinePath.Length - 1).Replace(".exe", "")
Dim sArgs As String() = GetUnixProcessArguments(prsCurrent)
Dim sParameter As String
Dim sWinePath As String()
'The wine-preloader parameters can refer to a path on the host system, windows based path within in the prefix, or mixed notation.
sParameter = sArgs(0).Replace("\", "/")
sWinePath = sParameter.Split("/")
sProcessCheck = Path.GetFileNameWithoutExtension(sWinePath(sWinePath.Length - 1))
bWineProcess = True
Else
bWineProcess = False