Browse Source

Merge pull request #604 from ionite34/fix-crash-when-no-image

Fix crash when trying to add `file://` to an `avares://` uri
pull/629/head
Ionite 7 months ago committed by GitHub
parent
commit
9843b6f7ae
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 1
      StabilityMatrix.Avalonia/Converters/FileUriConverter.cs

1
StabilityMatrix.Avalonia/Converters/FileUriConverter.cs

@ -17,6 +17,7 @@ public class FileUriConverter : IValueConverter
return value switch
{
string str when str.StartsWith("avares://") => new Uri(str),
string str => new Uri("file://" + str),
IFormattable formattable => new Uri("file://" + formattable.ToString(null, culture)),
_ => null

Loading…
Cancel
Save