确认下载路径之前检查盘符是否存在

pull/671/head
Jeb Feng 2 years ago
parent 3e1f3a74c5
commit 4a932a7f85
No known key found for this signature in database
GPG Key ID: 5665CB572AB6EAF6

@ -345,6 +345,7 @@
<system:String x:Key="IsDefaultDownloadDirectoryTip">选中后下次将不会弹出此窗口</system:String>
<system:String x:Key="Download">下载</system:String>
<system:String x:Key="WarningNullDirectory">文件夹路径不能为空</system:String>
<system:String x:Key="DriveNotFound">该磁盘不存在</system:String>
<!-- ViewParsingSelector -->
<system:String x:Key="ParsingSelector">选择解析项</system:String>

@ -191,6 +191,14 @@ namespace DownKyi.Services.Download
});
}
if (!Directory.Exists(Directory.GetDirectoryRoot(directory)))
{
var alert = new AlertService(dialogService);
alert.ShowError(DictionaryResource.GetString("DriveNotFound"));
directory = string.Empty;
}
// 下载设置dialog中如果点击取消或者关闭窗口
// 会返回空字符串,
// 这时直接退出

Loading…
Cancel
Save