Skip to content

Commit 26cc04f

Browse files
committed
[edit] static file path unified
1 parent fe434cf commit 26cc04f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Simplify.Web/StaticFiles/IO/StaticFile.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public bool IsValidPath(string relativeFilePath)
4444
public async Task<byte[]> GetDataAsync(string relativeFilePath)
4545
{
4646
#if NETSTANDARD2_0
47-
using var stream = File.Open(relativeFilePath, FileMode.Open, FileAccess.Read, FileShare.Read);
47+
using var stream = File.Open(sitePhysicalPath + relativeFilePath, FileMode.Open, FileAccess.Read, FileShare.Read);
4848

4949
var result = new byte[stream.Length];
5050

@@ -64,5 +64,5 @@ public async Task<byte[]> GetDataAsync(string relativeFilePath)
6464
/// Gets the file data.
6565
/// </summary>
6666
/// <param name="relativeFilePath">The relative file path.</param>
67-
public byte[] GetData(string relativeFilePath) => File.ReadAllBytes(relativeFilePath);
67+
public byte[] GetData(string relativeFilePath) => File.ReadAllBytes(sitePhysicalPath + relativeFilePath);
6868
}

0 commit comments

Comments
 (0)