diff --git a/AssetStudioGUI/AssetBrowser.cs b/AssetStudioGUI/AssetBrowser.cs index 7561633..e495c30 100644 --- a/AssetStudioGUI/AssetBrowser.cs +++ b/AssetStudioGUI/AssetBrowser.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.IO; using System.Linq; using System.Text.RegularExpressions; using System.Threading.Tasks; @@ -41,6 +42,12 @@ namespace AssetStudioGUI private async void loadSelected_Click(object sender, EventArgs e) { var files = assetListView.SelectedRows.Cast().Select(x => x.DataBoundItem as AssetEntry).Select(x => x.Source).ToHashSet(); + var missingFiles = files.Where(x => !File.Exists(x)); + foreach (var file in missingFiles) + { + Logger.Warning($"Unable to find file {file}, skipping..."); + files.Remove(file); + } if (files.Count != 0 && !files.Any(string.IsNullOrEmpty)) { Logger.Info("Loading...");