mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2025-12-17 07:14:28 +01:00
#109 fix: path sep on win
This commit is contained in:
@@ -73,16 +73,7 @@ String getTime(int? unixMill) {
|
||||
.replaceFirst('.000', '');
|
||||
}
|
||||
|
||||
/// Join two path with `/`
|
||||
String pathJoin(String path1, String path2) {
|
||||
return path1 + (path1.endsWith('/') ? '' : '/') + path2;
|
||||
}
|
||||
|
||||
String? getHomeDir() {
|
||||
final envVars = Platform.environment;
|
||||
if (isMacOS || isLinux) {
|
||||
return envVars['HOME'];
|
||||
} else if (isWindows) {
|
||||
return envVars['UserProfile'];
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user