diff --git a/BililiveRecorder.WPF/SettingsWindow.xaml.cs b/BililiveRecorder.WPF/SettingsWindow.xaml.cs index c99c49e..a506d2d 100644 --- a/BililiveRecorder.WPF/SettingsWindow.xaml.cs +++ b/BililiveRecorder.WPF/SettingsWindow.xaml.cs @@ -33,12 +33,24 @@ namespace BililiveRecorder.WPF private void Save(object sender, RoutedEventArgs e) { + if (!_CheckSavePath()) return; DialogResult = true; Close(); } + private bool _CheckSavePath() + { + if (string.IsNullOrWhiteSpace(Settings.SavePath)) + { + MessageBox.Show("请设置一个录像保存路径", "保存路径不能为空", MessageBoxButton.OK, MessageBoxImage.Warning); + return false; + } + return true; + } + private void Cancel(object sender, RoutedEventArgs e) { + if (!_CheckSavePath()) return; Close(); } diff --git a/CI/appveyor_install.ps1 b/CI/appveyor_install.ps1 index c1f0067..2dc3007 100644 --- a/CI/appveyor_install.ps1 +++ b/CI/appveyor_install.ps1 @@ -10,7 +10,7 @@ $commit_message_version_regex="^Release: (\d+\.\d+\.\d+)$" if ($env:APPVEYOR_REPO_BRANCH -eq "dev" -and $env:APPVEYOR_REPO_COMMIT_MESSAGE -cmatch $commit_message_version_regex) { - git checkout dev + git checkout dev -q $env:BILILIVERECORDER_RELEASE=$true $env:p_version="$($Matches[1]).0" Update-AppveyorBuild -Version "$env:p_version"