Myra icon indicating copy to clipboard operation
Myra copied to clipboard

MyraPad: System.UriFormatException Crash on Linux

Open Bamboy opened this issue 9 months ago • 0 comments

MyraPad will crash on start with a UriFormatException, when built for Linux.

The issue is that UriBuilder class tries to parse the executing assembly, a linux directory, with no proper handling protocol at the start.

https://github.com/rds1983/Myra/blob/0f5911ccabe6dfd58473466297f108a340da08d9/src/Myra/Utility/PathUtils.cs#L9-L18

Fix: Change Line 14 from: UriBuilder uri = new UriBuilder(codeBase); to: UriBuilder uri = new UriBuilder($"path:{codeBase}");

This resolved the issue for me. I believe that this will work on Windows as well, but I have not tried.

Bamboy avatar May 27 '25 06:05 Bamboy