From c9d7409cc091ba2537929bc61fa42576276eec41 Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Sun, 4 Sep 2022 13:26:27 +0800 Subject: [PATCH] KeyHandler // Change the path for dumpDOT. --- Source/Modules/ControllerModules/KeyHandler_Core.swift | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Source/Modules/ControllerModules/KeyHandler_Core.swift b/Source/Modules/ControllerModules/KeyHandler_Core.swift index 40b33e51..bf577bec 100644 --- a/Source/Modules/ControllerModules/KeyHandler_Core.swift +++ b/Source/Modules/ControllerModules/KeyHandler_Core.swift @@ -107,11 +107,9 @@ public class KeyHandler { // 在偵錯模式開啟時,將 GraphViz 資料寫入至指定位置。 if mgrPrefs.isDebugModeEnabled { let result = compositor.dumpDOT + let appSupportPath = FileManager.default.urls(for: .cachesDirectory, in: .userDomainMask)[0].path.appending("vChewing-visualization.dot") do { - try result.write( - toFile: "/private/var/tmp/vChewing-visualization.dot", - atomically: true, encoding: .utf8 - ) + try result.write(toFile: appSupportPath, atomically: true, encoding: .utf8) } catch { IME.prtDebugIntel("Failed from writing dumpDOT results.") }