This commit is contained in:
liwei committed 2024-01-19 11:54:36 +08:00
1 parent abccbabc78
commit 1c1fab2002
1 file changed
+4 -1
@@ -417,13 +417,16 @@ 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 DownloadsPath.downloadsDirectory())?.path ??
(await getApplicationDocumentsDirectory()).path;
} else {
config.downloadDir = './';
}