Browse Source

fix crash when directory not exist

pull/629/head
JT 9 months ago
parent
commit
09c72677b7
  1. 4
      StabilityMatrix.Avalonia/ViewModels/OutputsPageViewModel.cs

4
StabilityMatrix.Avalonia/ViewModels/OutputsPageViewModel.cs

@ -596,6 +596,10 @@ public partial class OutputsPageViewModel : PageViewModelBase
private ObservableCollection<PackageOutputCategory> GetSubfolders(string strPath)
{
var subfolders = new ObservableCollection<PackageOutputCategory>();
if (!Directory.Exists(strPath))
return subfolders;
var directories = Directory.EnumerateDirectories(strPath, "*", SearchOption.TopDirectoryOnly);
foreach (var dir in directories)

Loading…
Cancel
Save