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; }