From 7b7fdfeb7a6c43b7b560fc9bc42bc9a8cac0ce7a Mon Sep 17 00:00:00 2001 From: Paci <89483951+PaciStardust@users.noreply.github.com> Date: Mon, 19 Dec 2022 15:55:47 +0100 Subject: [PATCH] Text files with newlines now get read properly --- OscMultitool/Services/Speech/TextProcessor.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/OscMultitool/Services/Speech/TextProcessor.cs b/OscMultitool/Services/Speech/TextProcessor.cs index 35ab19a..412226a 100644 --- a/OscMultitool/Services/Speech/TextProcessor.cs +++ b/OscMultitool/Services/Speech/TextProcessor.cs @@ -103,8 +103,9 @@ private string ReplaceMessage(string message) { try { - return File.ReadAllText(filePath); - } catch (Exception e) + return string.Join(" ", File.ReadAllLines(filePath)); + } + catch (Exception e) { Logger.Error(e, "Failed to read provided file, is the path correct and does Hoscy have access?"); return string.Empty;