-
-
Notifications
You must be signed in to change notification settings - Fork 110
Closed
Description
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.
Myra/src/Myra/Utility/PathUtils.cs
Lines 9 to 18 in 0f5911c
| public static string ExecutingAssemblyDirectory | |
| { | |
| get | |
| { | |
| string codeBase = Assembly.GetExecutingAssembly().Location; | |
| UriBuilder uri = new UriBuilder(codeBase); | |
| string path = Uri.UnescapeDataString(uri.Path); | |
| return Path.GetDirectoryName(path); | |
| } | |
| } |
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.
Metadata
Metadata
Assignees
Labels
No labels