Skip to content

Commit

Permalink
Merge pull request #1698 from ImranR98/dev
Browse files Browse the repository at this point in the history
 Bugfix for files with vague 'content-disposition' header (#1697)
  • Loading branch information
ImranR98 authored Jun 29, 2024
2 parents cd153e7 + 5eceaee commit dfac3af
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/app_sources/fdroidrepo.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 3 additions & 1 deletion lib/providers/apps_provider.dart
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,9 @@ Future<File> 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
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit dfac3af

Please sign in to comment.