From 962861b74e6280f240fcd498360afc71ef871d0b Mon Sep 17 00:00:00 2001 From: Toki Date: Sun, 22 Dec 2024 11:33:34 +0900 Subject: [PATCH] =?UTF-8?q?path=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/utils/path.dart | 6 +++--- lib/utils/system_util.dart | 9 ++++----- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/lib/utils/path.dart b/lib/utils/path.dart index f63ff44..d30d4ed 100644 --- a/lib/utils/path.dart +++ b/lib/utils/path.dart @@ -19,11 +19,11 @@ class Path { static Future get dataPath async { String path = await userPath; if (Platform.isMacOS) { - path = '$path/Library/${await projectName}'; + path = '$path/Library/$appIdendifier'; } else if (Platform.isLinux) { - path = '$path/.config/${await projectName}'; + path = '$path/.config/$appIdendifier'; } else if (Platform.isWindows) { - path = '$path/AppData/Local/${await projectName}'; + path = '$path/AppData/Local/$appIdendifier'; } return dataFutrue(path); } diff --git a/lib/utils/system_util.dart b/lib/utils/system_util.dart index b5133f1..8228ab6 100644 --- a/lib/utils/system_util.dart +++ b/lib/utils/system_util.dart @@ -13,20 +13,19 @@ const int intMin = -0x8000000000000000; bool isDebug = true; String userPath = ''; String dataPath = ''; -String projectName = ''; String scriptPath = ''; String executablePath = ''; String appIdendifier = ''; String appName = ''; Future initialize(String name, String appID) async { + appIdendifier = appID; + appName = name; + scriptPath = Platform.script.toFilePath(windows: Platform.isWindows); + executablePath = Platform.executable; isDebug = path.basename(Platform.resolvedExecutable) == 'dart'; userPath = await Path.userPath; dataPath = await Path.dataPath; - scriptPath = Platform.script.toFilePath(windows: Platform.isWindows); - executablePath = Platform.executable; - appIdendifier = appID; - appName = name; }