mirror of
				https://github.com/ImranR98/Obtainium.git
				synced 2025-10-31 05:23:28 +01:00 
			
		
		
		
	Bugfix for files with vague 'content-disposition' header (#1697)
This commit is contained in:
		| @@ -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 | ||||
|   | ||||
		Reference in New Issue
	
	Block a user