mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-15 21:03:41 +00:00
temp
This commit is contained in:
1 parent
08603f9510
commit
3ddbc11378
11 files changed
+137
-16
No files matched your search
+11
-2
@@ -216,8 +216,17 @@ String? _getManifestPath(Browser browser) {
|
||||
return Util.homePathJoin(manifestName);
|
||||
}
|
||||
|
||||
final home =
|
||||
Platform.environment['HOME'] ?? Platform.environment['USERPROFILE'];
|
||||
String? home;
|
||||
if (Platform.isMacOS) {
|
||||
try {
|
||||
final user = Process.runSync("id", ["-un"]).stdout.trim();
|
||||
home = '/Users/$user';
|
||||
} catch (e) {
|
||||
// ignore
|
||||
}
|
||||
}
|
||||
home ??= Platform.environment['HOME'] ?? Platform.environment['USERPROFILE'];
|
||||
|
||||
if (home == null) return null;
|
||||
|
||||
if (Platform.isMacOS) {
|
||||
|
||||
Reference in new issue
Block a user