mirror of
https://github.com/chylex/TweetDuck.git
synced 2025-04-23 03:15:48 +02:00
Fix file type description in Save image dialog
This commit is contained in:
parent
b1ef00746f
commit
cb24a859f4
@ -49,14 +49,14 @@ public static string GetImageLink(string url, ImageQuality quality){
|
||||
|
||||
public static void DownloadImage(string url, ImageQuality quality){
|
||||
string file = BrowserUtils.GetFileNameFromUrl(ExtractImageBaseLink(url));
|
||||
string ext = Path.GetExtension(file);
|
||||
string ext = Path.GetExtension(file); // includes dot
|
||||
|
||||
using(SaveFileDialog dialog = new SaveFileDialog{
|
||||
AutoUpgradeEnabled = true,
|
||||
OverwritePrompt = true,
|
||||
Title = "Save image",
|
||||
FileName = file,
|
||||
Filter = "Image ("+(string.IsNullOrEmpty(ext) ? "unknown" : ext)+")|*.*"
|
||||
Filter = string.IsNullOrEmpty(ext) ? "Image (unknown)|*.*" : $"Image (*{ext})|*{ext}"
|
||||
}){
|
||||
if (dialog.ShowDialog() == DialogResult.OK){
|
||||
BrowserUtils.DownloadFileAsync(GetImageLink(url, quality), dialog.FileName, null, ex => {
|
||||
|
Loading…
Reference in New Issue
Block a user