diff --git a/VDF.GUI/Views/MainWindow.xaml b/VDF.GUI/Views/MainWindow.xaml index a5cd1384..ac82b9c5 100644 --- a/VDF.GUI/Views/MainWindow.xaml +++ b/VDF.GUI/Views/MainWindow.xaml @@ -1529,7 +1529,7 @@ Margin="5,0,0,2" FontWeight="Bold" Text="Search Directories" /> - + @@ -1583,6 +1583,10 @@ BorderThickness="1" DragDrop.AllowDrop="True" ItemsSource="{Binding Source={x:Static Settings:SettingsFile.Instance}, Path=Includes}" /> + + RowDefinitions="Auto, *, Auto"> @@ -1648,6 +1652,10 @@ BorderThickness="1" DragDrop.AllowDrop="True" ItemsSource="{Binding Source={x:Static Settings:SettingsFile.Instance}, Path=Blacklists}" /> + diff --git a/VDF.GUI/Views/MainWindow.xaml.cs b/VDF.GUI/Views/MainWindow.xaml.cs index 7a86e9f5..22d7027a 100644 --- a/VDF.GUI/Views/MainWindow.xaml.cs +++ b/VDF.GUI/Views/MainWindow.xaml.cs @@ -123,18 +123,20 @@ private void DropInclude(object? sender, DragEventArgs e) { foreach (var path in e.Data.GetFiles() ?? Array.Empty()) { if (path is not IStorageFolder) continue; - if (!SettingsFile.Instance.Includes.Contains(path.Name)) - SettingsFile.Instance.Includes.Add(path.Name); - } + string? localPath = path.TryGetLocalPath(); + if (!string.IsNullOrEmpty(localPath) && !SettingsFile.Instance.Includes.Contains(localPath)) + SettingsFile.Instance.Includes.Add(localPath); + } } private void DropBlacklist(object? sender, DragEventArgs e) { if (!e.Data.Contains(DataFormats.Files)) return; foreach (var path in e.Data.GetFiles() ?? Array.Empty()) { if (path is not IStorageFolder) continue; - if (!SettingsFile.Instance.Includes.Contains(path.Name)) - SettingsFile.Instance.Includes.Add(path.Name); - } + string? localPath = path.TryGetLocalPath(); + if (!string.IsNullOrEmpty(localPath) && !SettingsFile.Instance.Includes.Contains(localPath)) + SettingsFile.Instance.Includes.Add(localPath); + } } void Thumbnails_ValueChanged(object? sender, NumericUpDownValueChangedEventArgs e) {