mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-10 02:20:28 +00:00
Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
195dfac74b | ||
|
|
1c1fab2002 |
@@ -417,13 +417,15 @@ class AppController extends GetxController with WindowListener, TrayListener {
|
||||
if (config.downloadDir.isEmpty) {
|
||||
if (Util.isDesktop()) {
|
||||
config.downloadDir = (await getDownloadsDirectory())?.path ?? "./";
|
||||
} else if (Util.isMobile()) {
|
||||
} else if (Util.isAndroid()) {
|
||||
final downloadDir = (await DownloadsPath.downloadsDirectory())?.path;
|
||||
if (downloadDir != null) {
|
||||
config.downloadDir = '$downloadDir/Gopeed';
|
||||
} else {
|
||||
config.downloadDir = (await getApplicationDocumentsDirectory()).path;
|
||||
}
|
||||
} else if (Util.isIOS()) {
|
||||
config.downloadDir = (await getApplicationDocumentsDirectory()).path;
|
||||
} else {
|
||||
config.downloadDir = './';
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user