From ed12eaf87507bfa5cc9cc04a28c107f7a6e7d89f Mon Sep 17 00:00:00 2001 From: xkeyC <3334969096@qq.com> Date: Wed, 22 Nov 2023 00:28:14 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E5=8A=A8=E6=80=81=E6=A3=80=E6=B5=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/common/helper/log_helper.dart | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/lib/common/helper/log_helper.dart b/lib/common/helper/log_helper.dart index 537d87f..33816f9 100644 --- a/lib/common/helper/log_helper.dart +++ b/lib/common/helper/log_helper.dart @@ -97,10 +97,15 @@ class SCLoggerHelper { if (scInstallPaths.isNotEmpty) { // 动态检测更多位置 - for (var fileName in List.from(scInstallPaths)) { - for (var v in withVersion) { - await checkAndAddPath( - fileName.toString().replaceAll("\\$v", ""), true); + for (var v in withVersion) { + for (var fileName in List.from(scInstallPaths)) { + if (fileName.toString().endsWith(v)) { + for (var nv in withVersion) { + final nextName = + "${fileName.toString().replaceAll("\\$v", "")}\\$nv"; + await checkAndAddPath(nextName, true); + } + } } } }