Zooflow: Save Tokens in Custom searches

This commit is contained in:
Jonathan Jenne
2022-06-13 16:37:01 +02:00
parent 9c7af8d470
commit 84e29c2c0a
11 changed files with 227 additions and 93 deletions

View File

@@ -30,7 +30,7 @@ Namespace Search
Serializer = New XmlSerializer(GetType(SavedSearch.CustomSearchSerializable))
End Sub
Private Function GetSearchDirectoryPath() As String
Public Function GetSearchDirectoryPath() As String
Dim oConfigPath As String = Config.UserConfigPath
Dim oConfigDirectory As String = IO.Path.Combine(IO.Path.GetDirectoryName(oConfigPath), CUSTOM_SEARCH_DIRECTORY)
@@ -54,8 +54,8 @@ Namespace Search
}
Try
Dim oDirectoryPath As String = GetSearchDirectoryPath()
Dim oFilePath As String = IO.Path.Combine(oDirectoryPath, Utils.ConvertTextToSlug(pTitle) & ".xml")
Dim oSlug = Utils.ConvertTextToSlug(pTitle)
Dim oFilePath As String = IO.Path.Combine(GetSearchDirectoryPath(), $"{oSlug}.xml")
Dim oBuffer As Byte() = SerializeSearch(oSearch)
File.WriteAllBytes(oFilePath, oBuffer)