From 8c532430319b976d58f5effa5b60f22e25ade949 Mon Sep 17 00:00:00 2001 From: Para Date: Sun, 3 May 2020 10:24:30 -0400 Subject: [PATCH] Add 'if' and 'else' to OpenAppDataButton This would solve one of the issues I DM'd you about if the folder doesn't exist. --- ModAssistant/Pages/Options.xaml.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/ModAssistant/Pages/Options.xaml.cs b/ModAssistant/Pages/Options.xaml.cs index 9fd508a..d35fb01 100644 --- a/ModAssistant/Pages/Options.xaml.cs +++ b/ModAssistant/Pages/Options.xaml.cs @@ -194,7 +194,14 @@ namespace ModAssistant.Pages string location = Path.Combine( Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), "AppData", "LocalLow", "Hyperbolic Magnetism"); - Utils.OpenFolder(location); + if (Directory.Exists(location) + { + Utils.OpenFolder(location); + } + else + { + MessageBox.Show((string)Application.Current.FindResource("Options:AppDataNotFound")); + } } private async void YeetBSIPAButton_Click(object sender, RoutedEventArgs e)