diff --git a/src/DynamoCoreWpf/Controls/StartPage.xaml.cs b/src/DynamoCoreWpf/Controls/StartPage.xaml.cs index ca92535604d..1ee8f9944de 100644 --- a/src/DynamoCoreWpf/Controls/StartPage.xaml.cs +++ b/src/DynamoCoreWpf/Controls/StartPage.xaml.cs @@ -295,6 +295,10 @@ private void SetSampleDatasetsPath() { sampleDatasetsPath = datasetsPath; } + else + { + DynamoViewModel.Model.Logger.Log("Error, Dataset folder not found."); + } } } catch (Exception ex) diff --git a/src/DynamoCoreWpf/DynamoCoreWpf.csproj b/src/DynamoCoreWpf/DynamoCoreWpf.csproj index ef816e2e081..bf4f97c5d2c 100644 --- a/src/DynamoCoreWpf/DynamoCoreWpf.csproj +++ b/src/DynamoCoreWpf/DynamoCoreWpf.csproj @@ -59,7 +59,7 @@ - 1.0.18 + 1.0.19 DynamoHome diff --git a/src/DynamoCoreWpf/Views/HomePage/HomePage.xaml.cs b/src/DynamoCoreWpf/Views/HomePage/HomePage.xaml.cs index 906f6c5761f..63ff2b8ac44 100644 --- a/src/DynamoCoreWpf/Views/HomePage/HomePage.xaml.cs +++ b/src/DynamoCoreWpf/Views/HomePage/HomePage.xaml.cs @@ -615,8 +615,10 @@ internal void ShowSampleFilesInFolder() return; } - Process.Start(new ProcessStartInfo("explorer.exe", "/select," - + this.startPage.SampleFolderPath) + // Open the default Explorer location if the Sample folder cannot be found + string explorerArg = this.startPage.SampleFolderPath != null ? "/select," + this.startPage.SampleFolderPath : ""; + + Process.Start(new ProcessStartInfo("explorer.exe", explorerArg) { UseShellExecute = true }); Logging.Analytics.TrackEvent(Logging.Actions.Show, Logging.Categories.DynamoHomeOperations, "Sample Files"); } @@ -630,8 +632,7 @@ internal void ShowSampleDatasetsInFolder() return; } - Process.Start(new ProcessStartInfo("explorer.exe", /*"/select,"*/ - /*+ */this.startPage.SampleDatasetsPath) + Process.Start(new ProcessStartInfo("explorer.exe", this.startPage.SampleDatasetsPath) { UseShellExecute = true }); Logging.Analytics.TrackEvent(Logging.Actions.Show, Logging.Categories.DynamoHomeOperations, "Dataset Files"); }