From 4a932a7f85d67c77348ea94ffbab3f363e7f82a4 Mon Sep 17 00:00:00 2001 From: Jeb Feng Date: Sun, 5 Mar 2023 14:35:38 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A1=AE=E8=AE=A4=E4=B8=8B=E8=BD=BD=E8=B7=AF?= =?UTF-8?q?=E5=BE=84=E4=B9=8B=E5=89=8D=E6=A3=80=E6=9F=A5=E7=9B=98=E7=AC=A6?= =?UTF-8?q?=E6=98=AF=E5=90=A6=E5=AD=98=E5=9C=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/DownKyi/Languages/Default.xaml | 1 + src/DownKyi/Services/Download/AddToDownloadService.cs | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/src/DownKyi/Languages/Default.xaml b/src/DownKyi/Languages/Default.xaml index b481d9f..20846ed 100644 --- a/src/DownKyi/Languages/Default.xaml +++ b/src/DownKyi/Languages/Default.xaml @@ -345,6 +345,7 @@ 选中后下次将不会弹出此窗口 下载 文件夹路径不能为空 + 该磁盘不存在 选择解析项 diff --git a/src/DownKyi/Services/Download/AddToDownloadService.cs b/src/DownKyi/Services/Download/AddToDownloadService.cs index eddb62a..5edf7a9 100644 --- a/src/DownKyi/Services/Download/AddToDownloadService.cs +++ b/src/DownKyi/Services/Download/AddToDownloadService.cs @@ -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中如果点击取消或者关闭窗口, // 会返回空字符串, // 这时直接退出