Fix Windows save path detection for #148
This commit is contained in:
@@ -1927,8 +1927,8 @@ Public Class frmMain
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
If bWineProcess Then
|
If bWineProcess Then
|
||||||
'Attempt a path conversion if the game configuration is using an absolute windows path
|
'Attempt a path conversion if the game configuration is using an absolute windows path that we can convert
|
||||||
If oProcess.GameInfo.AbsolutePath And oProcess.GameInfo.TruePath.Contains("\") Then
|
If mgrVariables.CheckForReservedVariables(oProcess.GameInfo.TruePath) Then
|
||||||
Dim sWinePrefix As String = mgrPath.GetWinePrefix(oProcess.FoundProcess)
|
Dim sWinePrefix As String = mgrPath.GetWinePrefix(oProcess.FoundProcess)
|
||||||
Dim sWineSavePath As String
|
Dim sWineSavePath As String
|
||||||
If Not sWinePrefix = String.Empty Then
|
If Not sWinePrefix = String.Empty Then
|
||||||
@@ -1936,6 +1936,7 @@ Public Class frmMain
|
|||||||
sWineSavePath = mgrPath.GetWineSavePath(sWinePrefix, oProcess.GameInfo.TruePath)
|
sWineSavePath = mgrPath.GetWineSavePath(sWinePrefix, oProcess.GameInfo.TruePath)
|
||||||
If Not sWineSavePath = oProcess.GameInfo.TruePath Then
|
If Not sWineSavePath = oProcess.GameInfo.TruePath Then
|
||||||
oProcess.GameInfo.TruePath = sWineSavePath
|
oProcess.GameInfo.TruePath = sWineSavePath
|
||||||
|
oProcess.GameInfo.AbsolutePath = True
|
||||||
UpdateLog(mgrCommon.FormatString(frmMain_WineSavePath, New String() {oProcess.GameInfo.Name, sWineSavePath}), False)
|
UpdateLog(mgrCommon.FormatString(frmMain_WineSavePath, New String() {oProcess.GameInfo.Name, sWineSavePath}), False)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|||||||
@@ -166,4 +166,17 @@
|
|||||||
|
|
||||||
Return oList
|
Return oList
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Public Shared Function CheckForReservedVariables(ByVal sPath As String) As Boolean
|
||||||
|
Dim s As String
|
||||||
|
|
||||||
|
For Each s In GetReservedVariables()
|
||||||
|
s = "%" & s & "%"
|
||||||
|
If sPath.Contains(s) Then
|
||||||
|
Return True
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
Return False
|
||||||
|
End Function
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
Reference in New Issue
Block a user