mirror of
				https://github.com/ImranR98/Obtainium.git
				synced 2025-10-31 13:33:28 +01: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 { |     Future<void> downloadFn(MapEntry<String, String> fileUrl, App app) async { | ||||||
|       try { |       try { | ||||||
|         var exportDir = await settingsProvider.getExportDir(); |  | ||||||
|         String downloadPath = '${await getStorageRootPath()}/Download'; |         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, |         await downloadFile(fileUrl.value, fileUrl.key, true, | ||||||
|             (double? progress) { |             (double? progress) { | ||||||
|           notificationsProvider |           notificationsProvider | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user