diff --git a/ui/flutter/lib/pages/app/app_controller.dart b/ui/flutter/lib/pages/app/app_controller.dart index d94f994d..a83d2f1d 100644 --- a/ui/flutter/lib/pages/app/app_controller.dart +++ b/ui/flutter/lib/pages/app/app_controller.dart @@ -193,16 +193,18 @@ class AppController extends GetxController { extra.bt.trackerSubscribeUrls.addAll(allTrackerSubscribeUrls); } - if (Util.isDesktop()) { - config.downloadDir = (await getDownloadsDirectory())?.path ?? "./"; - } else if (Util.isAndroid()) { - config.downloadDir = (await getExternalStorageDirectory())?.path ?? - (await getApplicationDocumentsDirectory()).path; - return; - } else if (Util.isIOS()) { - config.downloadDir = (await getApplicationDocumentsDirectory()).path; - } else { - config.downloadDir = './'; + if (config.downloadDir.isEmpty) { + if (Util.isDesktop()) { + config.downloadDir = (await getDownloadsDirectory())?.path ?? "./"; + } else if (Util.isAndroid()) { + config.downloadDir = (await getExternalStorageDirectory())?.path ?? + (await getApplicationDocumentsDirectory()).path; + return; + } else if (Util.isIOS()) { + config.downloadDir = (await getApplicationDocumentsDirectory()).path; + } else { + config.downloadDir = './'; + } } }