mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-17 05:43:41 +00:00
test
This commit is contained in:
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 (config.downloadDir.isEmpty) {
|
||||||
if (Util.isDesktop()) {
|
if (Util.isDesktop()) {
|
||||||
config.downloadDir = (await getDownloadsDirectory())?.path ?? "./";
|
config.downloadDir = (await getDownloadsDirectory())?.path ?? "./";
|
||||||
} else if (Util.isMobile()) {
|
} else if (Util.isAndroid()) {
|
||||||
final downloadDir = (await DownloadsPath.downloadsDirectory())?.path;
|
final downloadDir = (await DownloadsPath.downloadsDirectory())?.path;
|
||||||
if (downloadDir != null) {
|
if (downloadDir != null) {
|
||||||
config.downloadDir = '$downloadDir/Gopeed';
|
config.downloadDir = '$downloadDir/Gopeed';
|
||||||
} else {
|
} else {
|
||||||
config.downloadDir = (await getApplicationDocumentsDirectory()).path;
|
config.downloadDir = (await getApplicationDocumentsDirectory()).path;
|
||||||
}
|
}
|
||||||
|
} else if (Util.isIOS()) {
|
||||||
|
config.downloadDir = (await DownloadsPath.downloadsDirectory())?.path ??
|
||||||
|
(await getApplicationDocumentsDirectory()).path;
|
||||||
} else {
|
} else {
|
||||||
config.downloadDir = './';
|
config.downloadDir = './';
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user