From 643c0c1cc7f84c28097e04199d9cd6852a3d6047 Mon Sep 17 00:00:00 2001 From: Kurt Date: Sat, 18 Jan 2020 17:33:19 -0800 Subject: [PATCH] null/empty check -> check both --- PKHeX.Core/Saves/Util/SaveDetection.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/PKHeX.Core/Saves/Util/SaveDetection.cs b/PKHeX.Core/Saves/Util/SaveDetection.cs index de840d6eb..cc13f766b 100644 --- a/PKHeX.Core/Saves/Util/SaveDetection.cs +++ b/PKHeX.Core/Saves/Util/SaveDetection.cs @@ -127,14 +127,14 @@ public static IEnumerable GetSaveFiles(IReadOnlyList drives, b public static IEnumerable GetFoldersToCheck(IReadOnlyList drives, IEnumerable extra) { - var foldersToCheck = extra.Where(f => f.Length > 0).Concat(CustomBackupPaths); + var foldersToCheck = extra.Where(f => !string.IsNullOrWhiteSpace(f)).Concat(CustomBackupPaths); string path3DS = Path.GetPathRoot(Get3DSLocation(drives)); - if (path3DS != null) // check for Homebrew/CFW backups + if (!string.IsNullOrEmpty(path3DS)) // check for Homebrew/CFW backups foldersToCheck = foldersToCheck.Concat(Get3DSBackupPaths(path3DS)); string pathNX = Path.GetPathRoot(GetSwitchLocation(drives)); - if (pathNX != null) // check for Homebrew/CFW backups + if (!string.IsNullOrEmpty(pathNX)) // check for Homebrew/CFW backups foldersToCheck = foldersToCheck.Concat(GetSwitchBackupPaths(pathNX)); return foldersToCheck;