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

croire 2 years ago
parent aa30fd836f
commit 8160cba222

@ -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