mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Special character error in ole db query (#1381)
This commit is contained in:
parent
792b383505
commit
d9d2cfb8a0
1 changed files with 3 additions and 3 deletions
|
|
@ -1,4 +1,4 @@
|
||||||
using Flow.Launcher.Infrastructure.Logger;
|
using Flow.Launcher.Infrastructure.Logger;
|
||||||
using Flow.Launcher.Plugin.Explorer.Search.QuickAccessLinks;
|
using Flow.Launcher.Plugin.Explorer.Search.QuickAccessLinks;
|
||||||
using Microsoft.Search.Interop;
|
using Microsoft.Search.Interop;
|
||||||
using System;
|
using System;
|
||||||
|
|
@ -17,7 +17,7 @@ namespace Flow.Launcher.Plugin.Explorer.Search.WindowsIndex
|
||||||
{
|
{
|
||||||
|
|
||||||
// Reserved keywords in oleDB
|
// Reserved keywords in oleDB
|
||||||
private const string reservedStringPattern = @"^[`\@\#\^,\&\/\\\$\%_;\[\]]+$";
|
private const string reservedStringPattern = @"^[`\@\@\#\#\*\^,\&\&\/\\\$\%_;\[\]]+$";
|
||||||
|
|
||||||
internal static async Task<List<Result>> ExecuteWindowsIndexSearchAsync(string indexQueryString, string connectionString, Query query, CancellationToken token)
|
internal static async Task<List<Result>> ExecuteWindowsIndexSearchAsync(string indexQueryString, string connectionString, Query query, CancellationToken token)
|
||||||
{
|
{
|
||||||
|
|
@ -29,7 +29,7 @@ namespace Flow.Launcher.Plugin.Explorer.Search.WindowsIndex
|
||||||
await using var conn = new OleDbConnection(connectionString);
|
await using var conn = new OleDbConnection(connectionString);
|
||||||
await conn.OpenAsync(token);
|
await conn.OpenAsync(token);
|
||||||
token.ThrowIfCancellationRequested();
|
token.ThrowIfCancellationRequested();
|
||||||
|
|
||||||
await using var command = new OleDbCommand(indexQueryString, conn);
|
await using var command = new OleDbCommand(indexQueryString, conn);
|
||||||
// Results return as an OleDbDataReader.
|
// Results return as an OleDbDataReader.
|
||||||
await using var dataReaderResults = await command.ExecuteReaderAsync(token) as OleDbDataReader;
|
await using var dataReaderResults = await command.ExecuteReaderAsync(token) as OleDbDataReader;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue