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