mirror of
https://github.com/ImranR98/Obtainium.git
synced 2025-07-24 18:09:42 +02:00
Bugfix for "download release assets" (#1968)
This commit is contained in:
@@ -1059,18 +1059,7 @@ class AppsProvider with ChangeNotifier {
|
||||
|
||||
Future<void> downloadFn(MapEntry<String, String> fileUrl, App app) async {
|
||||
try {
|
||||
var exportDir = await settingsProvider.getExportDir();
|
||||
String downloadPath = '${await getStorageRootPath()}/Download';
|
||||
bool downloadsAccessible = false;
|
||||
try {
|
||||
Directory(downloadPath).listSync();
|
||||
downloadsAccessible = true;
|
||||
} catch (e) {
|
||||
//
|
||||
}
|
||||
if (!downloadsAccessible && exportDir != null) {
|
||||
downloadPath = exportDir.path;
|
||||
}
|
||||
await downloadFile(fileUrl.value, fileUrl.key, true,
|
||||
(double? progress) {
|
||||
notificationsProvider
|
||||
|
Reference in New Issue
Block a user