From 065ca602bbcf1510394b4e4cb99995c977ec4e30 Mon Sep 17 00:00:00 2001 From: status102 <102887808+status102@users.noreply.github.com> Date: Sun, 20 Apr 2025 16:45:53 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20wpf=E5=8F=8D=E9=A6=88=E5=8E=8B=E7=BC=A9?= =?UTF-8?q?=E5=8C=85=E5=88=86=E7=A6=BB=E6=97=A5=E5=BF=97=E5=92=8C=E9=85=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../UserControl/Settings/IssueReportUserControlModel.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/MaaWpfGui/ViewModels/UserControl/Settings/IssueReportUserControlModel.cs b/src/MaaWpfGui/ViewModels/UserControl/Settings/IssueReportUserControlModel.cs index 5b687f271a..13233d3be0 100644 --- a/src/MaaWpfGui/ViewModels/UserControl/Settings/IssueReportUserControlModel.cs +++ b/src/MaaWpfGui/ViewModels/UserControl/Settings/IssueReportUserControlModel.cs @@ -17,6 +17,7 @@ using System.Diagnostics; using System.IO; using System.IO.Compression; using System.Linq; +using System.Windows; using HandyControl.Controls; using HandyControl.Data; using MaaWpfGui.Configuration; @@ -93,7 +94,9 @@ public class IssueReportUserControlModel : PropertyChangedBase continue; } - string dest = Path.Combine(debugTempPath, Path.GetFileName(file)); + string relativePath = Path.GetRelativePath(Environment.CurrentDirectory, file); + string dest = Path.Combine(tempPath, relativePath); + Directory.CreateDirectory(Path.GetDirectoryName(dest)!); File.Copy(file, dest, overwrite: true); }