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 = "";
|
string nextLine = "";
|
||||||
while ((nextLine = Source.ReadLine()) != null) {
|
while ((nextLine = Source.ReadLine()) != null) {
|
||||||
string[] parts = nextLine.Split('|');
|
string[] parts = nextLine.Split('|');
|
||||||
|
if (parts[0].Trim().Length == 0)
|
||||||
|
continue;
|
||||||
try {
|
try {
|
||||||
searchBox.AddDocument(
|
searchBox.AddDocument(
|
||||||
parts[0].Trim(),
|
parts[1].Trim(),
|
||||||
Regex.Split(parts[1], @",\s*"),
|
Regex.Split(parts[2], @",\s*"),
|
||||||
File.ReadAllText(parts[2].Trim())
|
File.ReadAllText(parts[0].Trim())
|
||||||
);
|
);
|
||||||
Console.Error.WriteLine($"[Searchbox] [add] {parts[0].Trim()}");
|
Console.Error.WriteLine($"[Searchbox] [add] {parts[0].Trim()}");
|
||||||
} catch (FileNotFoundException) {
|
} catch (FileNotFoundException) {
|
||||||
|
|
Loading…
Reference in a new issue