Skip to content

Commit 58cbc62

Browse files
authored
Merge pull request #91 from mylxsw/develop
bugfix Web 端无法运行的问题
2 parents 3718530 + f5d69c3 commit 58cbc62

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lib/helper/path.dart

+4-3
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,12 @@ class PathHelper {
3838
}
3939

4040
String get getHomePath {
41-
Map<String, String> envVars = Platform.environment;
4241
if (PlatformTool.isMacOS() || PlatformTool.isLinux()) {
43-
return '${envVars['HOME'] ?? ''}/.aidea'.replaceAll('\\', '/');
42+
return '${Platform.environment['HOME'] ?? ''}/.aidea'
43+
.replaceAll('\\', '/');
4444
} else if (PlatformTool.isWindows()) {
45-
return '${envVars['UserProfile'] ?? ''}/.aidea'.replaceAll('\\', '/');
45+
return '${Platform.environment['UserProfile'] ?? ''}/.aidea'
46+
.replaceAll('\\', '/');
4647
} else if (PlatformTool.isAndroid() || PlatformTool.isIOS()) {
4748
return '$documentsPath/.aidea'.replaceAll('\\', '/');
4849
}

0 commit comments

Comments
 (0)