diff --git a/Lagrange.OneBot/Core/Message/Entity/ImageSegment.cs b/Lagrange.OneBot/Core/Message/Entity/ImageSegment.cs index 5bbf9297f..eaddc2073 100644 --- a/Lagrange.OneBot/Core/Message/Entity/ImageSegment.cs +++ b/Lagrange.OneBot/Core/Message/Entity/ImageSegment.cs @@ -30,7 +30,7 @@ public void Build(MessageBuilder builder, ISegment segment) if (imageSegment.Url.StartsWith("file")) { - string path = new Uri(imageSegment.Url).AbsolutePath; + string path = new Uri(imageSegment.Url).LocalPath; builder.Image(File.ReadAllBytes(path)); }