mirror of
https://github.com/ImranR98/Obtainium.git
synced 2025-08-18 20:49:30 +02:00
Fix HTML release asset download (#1578)
This commit is contained in:
@@ -175,9 +175,8 @@ class _AppPageState extends State<AppPage> {
|
|||||||
tr('downloadX', args: [tr('releaseAsset').toLowerCase()]),
|
tr('downloadX', args: [tr('releaseAsset').toLowerCase()]),
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: Theme.of(context).textTheme.labelSmall!.copyWith(
|
style: Theme.of(context).textTheme.labelSmall!.copyWith(
|
||||||
decoration:
|
decoration: TextDecoration.underline,
|
||||||
changeLogFn != null ? TextDecoration.underline : null,
|
fontStyle: FontStyle.italic,
|
||||||
fontStyle: changeLogFn != null ? FontStyle.italic : null,
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@@ -223,6 +223,7 @@ Future<File> downloadFile(String url, String fileName, bool fileNameHasExt,
|
|||||||
if (url.toLowerCase().endsWith('.apk') && ext != 'apk') {
|
if (url.toLowerCase().endsWith('.apk') && ext != 'apk') {
|
||||||
ext = 'apk';
|
ext = 'apk';
|
||||||
}
|
}
|
||||||
|
fileName = fileName.split('/').last; // Ensure the fileName is a file name
|
||||||
File downloadedFile = File('$destDir/$fileName.$ext');
|
File downloadedFile = File('$destDir/$fileName.$ext');
|
||||||
if (fileNameHasExt) {
|
if (fileNameHasExt) {
|
||||||
// If the user says the filename already has an ext, ignore whatever you inferred from above
|
// If the user says the filename already has an ext, ignore whatever you inferred from above
|
||||||
|
Reference in New Issue
Block a user