Skip to content

Commit e60a471

Browse files
authored
Merge pull request LykosAI#988 from ionite34/backport/main/pr-986
[dev to main] backport: Fix crash when symlink target doesn't exist & fix width of package names (986)
2 parents d79e3fc + 5d050d3 commit e60a471

File tree

3 files changed

+14
-6
lines changed

3 files changed

+14
-6
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ and this project adheres to [Semantic Versioning 2.0](https://semver.org/spec/v2
1515
- Fixed ROCm torch indexes for ComfyUI & Forge
1616
- Fixed model browser sometimes downloading to `ModelsLora` or `ModelsStableDiffusion` folders instead of the correct folder
1717
- Fixed incorrect Unet folder path for ComfyUI users on Linux/macOS
18+
- Fixed [#1157](https://github.com/LykosAI/StabilityMatrix/issues/1157) - crash when broken symlinks exist in model directories
19+
- Fixed [#1154](https://github.com/LykosAI/StabilityMatrix/issues/1154) - increased width for package name on the package cards
1820

1921
## v2.13.3
2022
### Changed

StabilityMatrix.Avalonia/ViewModels/CheckpointsPageViewModel.cs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -987,12 +987,19 @@ private ObservableCollection<CheckpointCategory> GetSubfolders(string strPath)
987987

988988
foreach (var dir in directories)
989989
{
990+
var dirInfo = new DirectoryPath(dir);
991+
if (dirInfo.IsSymbolicLink)
992+
{
993+
if (!Directory.Exists(dirInfo.Info.LinkTarget))
994+
continue;
995+
}
996+
990997
var category = new CheckpointCategory
991998
{
992999
Name = Path.GetFileName(dir),
9931000
Path = dir,
994-
Count = new DirectoryInfo(dir)
995-
.EnumerateFileSystemInfos("*", EnumerationOptionConstants.AllDirectories)
1001+
Count = dirInfo
1002+
.Info.EnumerateFileSystemInfos("*", EnumerationOptionConstants.AllDirectories)
9961003
.Count(x => LocalModelFile.SupportedCheckpointExtensions.Contains(x.Extension))
9971004
};
9981005

StabilityMatrix.Avalonia/Views/PackageManager/MainPackageManagerView.axaml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,13 +76,12 @@
7676
</Border>
7777
<Grid
7878
Grid.Column="1"
79-
ColumnDefinitions="Auto, *"
79+
ColumnDefinitions="*, Auto"
8080
RowDefinitions="Auto, Auto, Auto, *">
8181
<TextBlock
8282
Grid.Row="0"
8383
Grid.Column="0"
84-
MaxWidth="200"
85-
Margin="8,0,8,0"
84+
Margin="8,0,0,0"
8685
FontSize="16"
8786
FontWeight="SemiBold"
8887
Text="{Binding Package.DisplayName}"
@@ -102,7 +101,7 @@
102101
Grid.Row="0"
103102
Grid.Column="1"
104103
Width="24"
105-
Margin="4,0,0,0"
104+
Margin="0,0,0,0"
106105
Padding="4"
107106
HorizontalAlignment="Right"
108107
VerticalAlignment="Top"

0 commit comments

Comments
 (0)