From 82d2b1758b5ceeea9acbd7e05102fdfdf7181e35 Mon Sep 17 00:00:00 2001 From: Ricky8955555 <397050061@qq.com> Date: Sun, 16 May 2021 10:21:03 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=96=B9=E6=B3=95=E5=90=8D?= =?UTF-8?q?=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Extensions/SystemExtensions.cs | 2 +- src/Utilities/FolderBrowserDialogUtilities.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Extensions/SystemExtensions.cs b/src/Extensions/SystemExtensions.cs index 1fb8d51..5729787 100644 --- a/src/Extensions/SystemExtensions.cs +++ b/src/Extensions/SystemExtensions.cs @@ -22,6 +22,6 @@ public static Exception ShowAndLog(this Exception ex, Logger logger, bool termin return ex; } - public static string CheckEmpty(this string str) => string.IsNullOrEmpty(str) ? null : str; + public static string IsEmptyOrNull(this string str) => string.IsNullOrEmpty(str) ? null : str; } } diff --git a/src/Utilities/FolderBrowserDialogUtilities.cs b/src/Utilities/FolderBrowserDialogUtilities.cs index ba8d60e..97b4c92 100644 --- a/src/Utilities/FolderBrowserDialogUtilities.cs +++ b/src/Utilities/FolderBrowserDialogUtilities.cs @@ -16,7 +16,7 @@ public static string GetFilePath(string description = "") var dialog = new FolderBrowserDialog() { Description = description }; dialog.ShowDialog(); - return dialog.SelectedPath.CheckEmpty(); + return dialog.SelectedPath.IsEmptyOrNull(); } } }