windows path separator
This commit is contained in:
parent
834e1d3fa4
commit
ce0584334e
@ -2,7 +2,7 @@
|
||||
<PropertyGroup>
|
||||
<!--package info-->
|
||||
<PackageId>DTLib.Ben.Demystifier</PackageId>
|
||||
<Version>1.0.1</Version>
|
||||
<Version>1.0.2</Version>
|
||||
<Authors>Timerix</Authors>
|
||||
<Description>netstandard2.0 fork of Ben.Demystifier</Description>
|
||||
<RepositoryType>GIT</RepositoryType>
|
||||
|
||||
@ -62,17 +62,11 @@ public partial class EnhancedStackTrace : StackTrace, IEnumerable<EnhancedStackF
|
||||
|
||||
var fileName = frame.GetFileName();
|
||||
if (!string.IsNullOrEmpty(fileName))
|
||||
{
|
||||
sb.Append(" in ");
|
||||
sb.Append(TryGetFullPath(fileName!));
|
||||
}
|
||||
sb.Append(" in ").Append(TryGetFullPath(fileName!));
|
||||
|
||||
var lineNo = frame.GetFileLineNumber();
|
||||
if (lineNo != 0)
|
||||
{
|
||||
sb.Append(':');
|
||||
sb.Append(lineNo);
|
||||
}
|
||||
sb.Append(':').Append(lineNo);
|
||||
}
|
||||
}
|
||||
|
||||
@ -84,6 +78,8 @@ public partial class EnhancedStackTrace : StackTrace, IEnumerable<EnhancedStackF
|
||||
{
|
||||
if (Uri.TryCreate(filePath, UriKind.Absolute, out var uri) && uri.IsFile)
|
||||
return Uri.UnescapeDataString(uri.AbsolutePath);
|
||||
if (Environment.OSVersion.Platform == PlatformID.Win32NT)
|
||||
return filePath.Replace('/', '\\');
|
||||
return filePath;
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user