Skip to content

Commit 4bd2276

Browse files
committed
MyraPad: Fix for startup crash on linux systems. (URIFormatException)
1 parent 0f5911c commit 4bd2276

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

samples/Myra.Samples.AssetManagement/PathUtils.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public static string ExecutingAssemblyDirectory
1111
get
1212
{
1313
string codeBase = Assembly.GetExecutingAssembly().Location;
14-
UriBuilder uri = new UriBuilder(codeBase);
14+
UriBuilder uri = new UriBuilder($"path:{codeBase}");
1515
string path = Uri.UnescapeDataString(uri.Path);
1616
return Path.GetDirectoryName(path);
1717
}

src/Myra/Utility/PathUtils.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public static string ExecutingAssemblyDirectory
1111
get
1212
{
1313
string codeBase = Assembly.GetExecutingAssembly().Location;
14-
UriBuilder uri = new UriBuilder(codeBase);
14+
UriBuilder uri = new UriBuilder($"path:{codeBase}");
1515
string path = Uri.UnescapeDataString(uri.Path);
1616
return Path.GetDirectoryName(path);
1717
}

0 commit comments

Comments
 (0)