Use linux variables in db upgrade for issue #152
This commit is contained in:
@@ -864,11 +864,17 @@ Public Class mgrSQLite
|
|||||||
BackupDB("v110")
|
BackupDB("v110")
|
||||||
|
|
||||||
'Convert core path variables to new standard
|
'Convert core path variables to new standard
|
||||||
sSQL = "UPDATE monitorlist SET Path = Replace(Path,'*appdatalocal*','%LOCALAPPDATA%');"
|
If Not mgrCommon.IsUnix Then
|
||||||
sSQL &= "UPDATE monitorlist SET Path = Replace(Path,'*appdataroaming*','%APPDATA%');"
|
sSQL = "UPDATE monitorlist SET Path = Replace(Path,'*appdatalocal*','%LOCALAPPDATA%');"
|
||||||
sSQL &= "UPDATE monitorlist SET Path = Replace(Path,'*mydocs*','%USERDOCUMENTS%');"
|
sSQL &= "UPDATE monitorlist SET Path = Replace(Path,'*appdataroaming*','%APPDATA%');"
|
||||||
sSQL &= "UPDATE monitorlist SET Path = Replace(Path,'*currentuser*','%USERPROFILE%');"
|
sSQL &= "UPDATE monitorlist SET Path = Replace(Path,'*mydocs*','%USERDOCUMENTS%');"
|
||||||
sSQL &= "UPDATE monitorlist SET Path = Replace(Path,'*publicdocs*','%COMMONDOCUMENTS%');"
|
sSQL &= "UPDATE monitorlist SET Path = Replace(Path,'*currentuser*','%USERPROFILE%');"
|
||||||
|
sSQL &= "UPDATE monitorlist SET Path = Replace(Path,'*publicdocs*','%COMMONDOCUMENTS%');"
|
||||||
|
Else
|
||||||
|
sSQL = "UPDATE monitorlist SET Path = Replace(Path,'*appdatalocal*','${XDG_DATA_HOME:-~/.local/share}');"
|
||||||
|
sSQL &= "UPDATE monitorlist SET Path = Replace(Path,'*appdataroaming*','${XDG_CONFIG_HOME:-~/.config}');"
|
||||||
|
sSQL &= "UPDATE monitorlist SET Path = Replace(Path,'*mydocs*','~');"
|
||||||
|
End If
|
||||||
|
|
||||||
'Convert custom variables to new standard
|
'Convert custom variables to new standard
|
||||||
Dim hshVariables As Hashtable = mgrVariables.ReadVariables()
|
Dim hshVariables As Hashtable = mgrVariables.ReadVariables()
|
||||||
@@ -880,9 +886,9 @@ Public Class mgrSQLite
|
|||||||
|
|
||||||
sSQL &= "PRAGMA user_version=115"
|
sSQL &= "PRAGMA user_version=115"
|
||||||
|
|
||||||
RunParamQuery(sSQL, New Hashtable)
|
RunParamQuery(sSQL, New Hashtable)
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Function GetDBSize() As Long
|
Public Function GetDBSize() As Long
|
||||||
|
|||||||
Reference in New Issue
Block a user