Skip to content

Commit

Permalink
修改:显式指定图标路径为空时使用默认图标
Browse files Browse the repository at this point in the history
  • Loading branch information
JiuLing-zhang committed Sep 25, 2024
1 parent 1f9a8be commit 5a6771e
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,14 @@ public UpgradeSettingBuilder WithLang(string lang)
/// <returns></returns>
public UpgradeSettingBuilder WithIcon(string path)
{
if (!File.Exists(path))
if (!string.IsNullOrEmpty(path))
{
throw new FileNotFoundException($"图标文件不存在: {path}");
if (!File.Exists(path))
{
throw new FileNotFoundException($"图标文件不存在: {path}");
}
_upgradeSetting.IconPath = path;
}
_upgradeSetting.IconPath = path;
return this;
}

Expand Down

0 comments on commit 5a6771e

Please sign in to comment.