Skip to content

Commit

Permalink
Merge pull request #91 from mylxsw/develop
Browse files Browse the repository at this point in the history
bugfix Web 端无法运行的问题
  • Loading branch information
mylxsw committed Jan 31, 2024
2 parents 3718530 + f5d69c3 commit 58cbc62
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/helper/path.dart
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,12 @@ class PathHelper {
}

String get getHomePath {
Map<String, String> envVars = Platform.environment;
if (PlatformTool.isMacOS() || PlatformTool.isLinux()) {
return '${envVars['HOME'] ?? ''}/.aidea'.replaceAll('\\', '/');
return '${Platform.environment['HOME'] ?? ''}/.aidea'
.replaceAll('\\', '/');
} else if (PlatformTool.isWindows()) {
return '${envVars['UserProfile'] ?? ''}/.aidea'.replaceAll('\\', '/');
return '${Platform.environment['UserProfile'] ?? ''}/.aidea'
.replaceAll('\\', '/');
} else if (PlatformTool.isAndroid() || PlatformTool.isIOS()) {
return '$documentsPath/.aidea'.replaceAll('\\', '/');
}
Expand Down

0 comments on commit 58cbc62

Please sign in to comment.