From 74bca499f8bccde52e36b374f0a0fda409d5f97b Mon Sep 17 00:00:00 2001 From: Samuel Lemaitre Date: Sat, 18 Feb 2017 10:12:56 +0100 Subject: [PATCH] Fix Directory not found exception Fix application crash due to an System.IO.DirectoryNotFoundException --- SteamCleaner/Analyzer/AnalyzerService.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SteamCleaner/Analyzer/AnalyzerService.cs b/SteamCleaner/Analyzer/AnalyzerService.cs index fe19c4c..d48bb1f 100644 --- a/SteamCleaner/Analyzer/AnalyzerService.cs +++ b/SteamCleaner/Analyzer/AnalyzerService.cs @@ -121,7 +121,7 @@ private List FindFiles(List paths, IProgress paths) { //Check if this still works! - var nested = paths.Select(Directory.GetDirectories) + var nested = paths.Where(Directory.Exists).Select(Directory.GetDirectories) .SelectMany(nestedGameFolders => nestedGameFolders) .ToList(); paths.AddRange(nested); @@ -132,4 +132,4 @@ private string FormatError(object obj, Exception e) return string.Format("Error with analyzer: {0}. Message: {1}", obj.GetType().Name, e.Message); } } -} \ No newline at end of file +}