Skip to content

Commit

Permalink
Merge pull request #923 from yaobiao131/bugfix
Browse files Browse the repository at this point in the history
fix: #907
  • Loading branch information
leiurayer authored Dec 9, 2023
2 parents 8bd5190 + ca14b75 commit a8c8626
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/DownKyi/Services/Download/AddToDownloadService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,11 @@ public string SetDirectory(IDialogService dialogService)
});
}

// 下载设置dialog中如果点击取消或者关闭窗口,
// 会返回空字符串,
// 这时直接退出
if (string.IsNullOrEmpty(directory)) { return null; }

if (!Directory.Exists(Directory.GetDirectoryRoot(directory)))
{
var alert = new AlertService(dialogService);
Expand All @@ -199,10 +204,6 @@ public string SetDirectory(IDialogService dialogService)
directory = string.Empty;
}

// 下载设置dialog中如果点击取消或者关闭窗口,
// 会返回空字符串,
// 这时直接退出
if (directory == null || directory == string.Empty) { return null; }

// 文件夹不存在则创建
if (!Directory.Exists(directory))
Expand Down

0 comments on commit a8c8626

Please sign in to comment.