Skip to content
This repository was archived by the owner on Dec 24, 2022. It is now read-only.

Commit 68d51b9

Browse files
committed
Change MapHostAbsolutePath() to return Host path when called in ASP.NET Core Web App
1 parent 8fb3b93 commit 68d51b9

File tree

5 files changed

+6
-2
lines changed

5 files changed

+6
-2
lines changed

lib/ServiceStack.Client.dll

1.5 KB
Binary file not shown.

lib/ServiceStack.Common.dll

0 Bytes
Binary file not shown.

lib/ServiceStack.Interfaces.dll

0 Bytes
Binary file not shown.

lib/tests/ServiceStack.Interfaces.dll

0 Bytes
Binary file not shown.

src/ServiceStack.Text/PathUtils.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,12 @@ public static string MapAbsolutePath(this string relativePath)
5050
/// <remarks>Assumes static content is in the parent folder of the /bin/ directory</remarks>
5151
public static string MapHostAbsolutePath(this string relativePath)
5252
{
53-
var mapPath = MapAbsolutePath(relativePath, $"{PclExport.Instance.DirSep}..");
54-
return mapPath;
53+
#if !NETSTANDARD1_1
54+
return PclExport.Instance.MapAbsolutePath(relativePath, $"{PclExport.Instance.DirSep}..");
55+
#else
56+
var sep = PclExport.Instance.DirSep;
57+
return PclExport.Instance.MapAbsolutePath(relativePath, $"{sep}..{sep}..{sep}..");
58+
#endif
5559
}
5660

5761
internal static string CombinePaths(StringBuilder sb, params string[] paths)

0 commit comments

Comments
 (0)