Bugfix batch addition mode
This commit is contained in:
parent
03c2629a35
commit
c663882726
1 changed files with 5 additions and 3 deletions
|
@ -159,11 +159,13 @@ namespace SearchBoxCLI
|
|||
string nextLine = "";
|
||||
while ((nextLine = Source.ReadLine()) != null) {
|
||||
string[] parts = nextLine.Split('|');
|
||||
if (parts[0].Trim().Length == 0)
|
||||
continue;
|
||||
try {
|
||||
searchBox.AddDocument(
|
||||
parts[0].Trim(),
|
||||
Regex.Split(parts[1], @",\s*"),
|
||||
File.ReadAllText(parts[2].Trim())
|
||||
parts[1].Trim(),
|
||||
Regex.Split(parts[2], @",\s*"),
|
||||
File.ReadAllText(parts[0].Trim())
|
||||
);
|
||||
Console.Error.WriteLine($"[Searchbox] [add] {parts[0].Trim()}");
|
||||
} catch (FileNotFoundException) {
|
||||
|
|
Loading…
Reference in a new issue