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 'Unix Handler
'We need some special handling for Wine processes 'We need some special handling for Wine processes
If mgrCommon.IsUnix And (sProcessCheck.ToLower = "wine-preloader" Or sProcessCheck.ToLower = "wine64-preloader") Then If mgrCommon.IsUnix And (sProcessCheck.ToLower = "wine-preloader" Or sProcessCheck.ToLower = "wine64-preloader") Then
Dim sWinePath As String() = GetUnixProcessArguments(prsCurrent) Dim sArgs 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. Dim sParameter As String
If sWinePath(0).Contains("\") Then Dim sWinePath As String()
sWinePath = GetUnixProcessArguments(prsCurrent)(0).Split("\") 'The wine-preloader parameters can refer to a path on the host system, windows based path within in the prefix, or mixed notation.
ElseIf sWinePath(0).Contains("/") Then sParameter = sArgs(0).Replace("\", "/")
sWinePath = GetUnixProcessArguments(prsCurrent)(0).Split("/") sWinePath = sParameter.Split("/")
End If sProcessCheck = Path.GetFileNameWithoutExtension(sWinePath(sWinePath.Length - 1))
sProcessCheck = sWinePath(sWinePath.Length - 1).Replace(".exe", "")
bWineProcess = True bWineProcess = True
Else Else
bWineProcess = False bWineProcess = False