private void AddDirectory(object eventArgs) { Status.Text = "Adding directory"; using (var dialog = new FolderBrowserDialog()) { var result = dialog.ShowDialog(); if (result != DialogResult.OK) { return; } _logger.Debug($"GOT :: {result.ToString()}, {dialog.SelectedPath}"); // make sure the directory is not empty as this will kill the CLI if (!FileActions.GetFilesInDirectory(dialog.SelectedPath, SearchOption.AllDirectories).Any()) { _logger.Debug($"Ignoring: '{dialog.SelectedPath}' as the folder is empty"); return; } if (SafeAddAssetFolder(dialog.SelectedPath)) { Status.Text = $"Added: {dialog.SelectedPath}"; CheckMissingAssets(dialog.SelectedPath); } } }