From 36bb5a2d89917b50e17d35222e2c14bff681af83 Mon Sep 17 00:00:00 2001 From: Sparrkle Date: Wed, 14 Sep 2022 12:58:46 +0900 Subject: [PATCH] Special character error in ole db query --- .../Search/WindowsIndex/IndexSearch.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Search/WindowsIndex/IndexSearch.cs b/Plugins/Flow.Launcher.Plugin.Explorer/Search/WindowsIndex/IndexSearch.cs index 2e842c84354..318a9bde958 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Search/WindowsIndex/IndexSearch.cs +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Search/WindowsIndex/IndexSearch.cs @@ -1,4 +1,4 @@ -using Flow.Launcher.Infrastructure.Logger; +using Flow.Launcher.Infrastructure.Logger; using Flow.Launcher.Plugin.Explorer.Search.QuickAccessLinks; using Microsoft.Search.Interop; using System; @@ -17,7 +17,7 @@ internal static class IndexSearch { // Reserved keywords in oleDB - private const string reservedStringPattern = @"^[`\@\#\^,\&\/\\\$\%_;\[\]]+$"; + private const string reservedStringPattern = @"^[`\@\@\#\#\*\^,\&\&\/\\\$\%_;\[\]]+$"; internal static async Task> ExecuteWindowsIndexSearchAsync(string indexQueryString, string connectionString, Query query, CancellationToken token) { @@ -29,7 +29,7 @@ internal static async Task> ExecuteWindowsIndexSearchAsync(string i await using var conn = new OleDbConnection(connectionString); await conn.OpenAsync(token); token.ThrowIfCancellationRequested(); - + await using var command = new OleDbCommand(indexQueryString, conn); // Results return as an OleDbDataReader. await using var dataReaderResults = await command.ExecuteReaderAsync(token) as OleDbDataReader;