From 62c23004f78090a95114955cf657f4d860c9a496 Mon Sep 17 00:00:00 2001 From: Imran Remtulla Date: Sat, 29 Jun 2024 03:01:48 -0400 Subject: [PATCH 1/2] Bugfix for files with vague 'content-disposition' header (#1697) --- lib/providers/apps_provider.dart | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/providers/apps_provider.dart b/lib/providers/apps_provider.dart index 9c125215..6d5b6741 100644 --- a/lib/providers/apps_provider.dart +++ b/lib/providers/apps_provider.dart @@ -220,7 +220,9 @@ Future downloadFile(String url, String fileName, bool fileNameHasExt, if (ext.endsWith('"') || ext.endsWith("other")) { ext = ext.substring(0, ext.length - 1); } - if (url.toLowerCase().endsWith('.apk') && ext != 'apk') { + if (((Uri.tryParse(url)?.path ?? url).toLowerCase().endsWith('.apk') || + ext == 'attachment') && + ext != 'apk') { ext = 'apk'; } fileName = fileName.split('/').last; // Ensure the fileName is a file name From 5eceaeecde68875a7856e4e821ff577c8e337470 Mon Sep 17 00:00:00 2001 From: Imran Remtulla Date: Sat, 29 Jun 2024 03:02:56 -0400 Subject: [PATCH 2/2] Increment version, run dart fix --- lib/app_sources/fdroidrepo.dart | 4 ++-- pubspec.yaml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/app_sources/fdroidrepo.dart b/lib/app_sources/fdroidrepo.dart index 1eb02625..f4afe082 100644 --- a/lib/app_sources/fdroidrepo.dart +++ b/lib/app_sources/fdroidrepo.dart @@ -88,8 +88,8 @@ class FDroidRepo extends AppSource { @override void runOnAddAppInputChange(String userInput) { - this.additionalSourceAppSpecificSettingFormItems = - this.additionalSourceAppSpecificSettingFormItems.map((row) { + additionalSourceAppSpecificSettingFormItems = + additionalSourceAppSpecificSettingFormItems.map((row) { row = row.map((item) { if (item.key == 'appIdOrName') { try { diff --git a/pubspec.yaml b/pubspec.yaml index d3cfec25..18aec9b8 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -17,7 +17,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # In Windows, build-name is used as the major, minor, and patch parts # of the product and file versions while build-number is used as the build suffix. -version: 1.1.12+2269 +version: 1.1.13+2270 environment: sdk: '>=3.0.0 <4.0.0'