From 753caf3cdeb8b6a92986af594a12e19ac32fcfef Mon Sep 17 00:00:00 2001 From: status102 <102887808+status102@users.noreply.github.com> Date: Mon, 19 Jan 2026 13:30:05 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=96=B0Config=E7=A5=9E=E7=A7=98?= =?UTF-8?q?=E5=B0=8Fbug=E4=B8=A2=E5=A4=B1Default?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/MaaWpfGui/Helper/ConfigConverter.cs | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/MaaWpfGui/Helper/ConfigConverter.cs b/src/MaaWpfGui/Helper/ConfigConverter.cs index 1bb9ec8c0d..c48d29e661 100644 --- a/src/MaaWpfGui/Helper/ConfigConverter.cs +++ b/src/MaaWpfGui/Helper/ConfigConverter.cs @@ -51,11 +51,26 @@ public class ConfigConverter var root = ParseJsonFile(ConfigurationNewFile); bool ret = true; - if (ConfigurationHelper.ContainsKey(ConfigurationKeys.Stage1)) + var needConvert = root?["Configurations"] is not JObject jObj || jObj.Count == 0 // 有神秘小配置Config里没东西 + || jObj["Default"]?["TaskQueueOrder"] is not null; // 常规撤 + if (needConvert) { ret &= ConvertTaskQueue(); } + else + { // for 6.3.0-beta 出错用户 + bool needConvert2 = root?["Configurations"] is JObject configurations && configurations.Properties() + .Where(p => p.Value is JObject config && config.ContainsKey("TaskQueue")) + .Any(p => { + var taskQueue = ((JObject)p.Value)["TaskQueue"]; + return taskQueue == null || (taskQueue is JArray jsonArray && jsonArray.Count == 0); + }); + if (needConvert2) + { + ret &= ConvertTaskQueue(); + } + } return ret; }