From 830e785df5b234da54d6f62abe0df2904533fdef Mon Sep 17 00:00:00 2001 From: JT Date: Thu, 27 Jul 2023 17:34:10 -0700 Subject: [PATCH] Fix model browser downloading files without extensions --- .../ViewModels/Dialogs/CivitFileViewModel.cs | 1 - .../Views/Dialogs/SelectModelVersionDialog.axaml | 2 +- StabilityMatrix.Core/Models/Api/CivitFile.cs | 2 ++ 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/StabilityMatrix.Avalonia/ViewModels/Dialogs/CivitFileViewModel.cs b/StabilityMatrix.Avalonia/ViewModels/Dialogs/CivitFileViewModel.cs index adff3887..f68dde05 100644 --- a/StabilityMatrix.Avalonia/ViewModels/Dialogs/CivitFileViewModel.cs +++ b/StabilityMatrix.Avalonia/ViewModels/Dialogs/CivitFileViewModel.cs @@ -13,7 +13,6 @@ public partial class CivitFileViewModel : ObservableObject public CivitFileViewModel(HashSet installedModelHashes, CivitFile civitFile) { CivitFile = civitFile; - CivitFile.Name = Path.GetFileNameWithoutExtension(CivitFile.Name); IsInstalled = CivitFile is {Type: CivitFileType.Model, Hashes.BLAKE3: not null} && installedModelHashes.Contains(CivitFile.Hashes.BLAKE3); } diff --git a/StabilityMatrix.Avalonia/Views/Dialogs/SelectModelVersionDialog.axaml b/StabilityMatrix.Avalonia/Views/Dialogs/SelectModelVersionDialog.axaml index 2f0889ae..b9e6f435 100644 --- a/StabilityMatrix.Avalonia/Views/Dialogs/SelectModelVersionDialog.axaml +++ b/StabilityMatrix.Avalonia/Views/Dialogs/SelectModelVersionDialog.axaml @@ -78,7 +78,7 @@ IsVisible="{Binding IsInstalled}" VerticalAlignment="Center" /> Path.GetFileNameWithoutExtension(Name); }