From a5157a60526dd95125f2ffdb97155ba07131bf08 Mon Sep 17 00:00:00 2001 From: Jicheng Lu Date: Sat, 6 Sep 2025 15:52:14 -0500 Subject: [PATCH] minor change --- .../Storage/LocalFileStorageService.Conversation.cs | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/Infrastructure/BotSharp.Core/Files/Services/Storage/LocalFileStorageService.Conversation.cs b/src/Infrastructure/BotSharp.Core/Files/Services/Storage/LocalFileStorageService.Conversation.cs index 137fb5a3..81e668c1 100644 --- a/src/Infrastructure/BotSharp.Core/Files/Services/Storage/LocalFileStorageService.Conversation.cs +++ b/src/Infrastructure/BotSharp.Core/Files/Services/Storage/LocalFileStorageService.Conversation.cs @@ -159,20 +159,19 @@ public partial class LocalFileStorageService public bool SaveMessageFiles(string conversationId, string messageId, string source, List files) { - if (files.IsNullOrEmpty()) - { - return false; - } - if (string.IsNullOrWhiteSpace(conversationId) || string.IsNullOrWhiteSpace(messageId) - || string.IsNullOrWhiteSpace(source)) + || string.IsNullOrWhiteSpace(source) + || files.IsNullOrEmpty()) { return false; } var dir = GetConversationFileDirectory(conversationId, messageId, createNewDir: true); - if (!ExistDirectory(dir)) return false; + if (!ExistDirectory(dir)) + { + return false; + } for (int i = 0; i < files.Count; i++) {