Skip to content

Commit 80a0175

Browse files
committed
Better fix for the case sensitivity issues
1 parent 2571c21 commit 80a0175

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/NitroSharp/Content/ContentManager.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,12 @@ public bool ResolveAssets()
187187

188188
public Stream OpenStream(string path)
189189
{
190-
string fullPath = Path.Combine(RootDirectory, path.ToLowerInvariant());
190+
if (Path.GetDirectoryName(path) is string dir
191+
&& Path.GetFileName(path) is string filename)
192+
{
193+
path = Path.Combine(dir, filename.ToLowerInvariant());
194+
}
195+
string fullPath = Path.Combine(RootDirectory, path);
191196
return File.OpenRead(fullPath);
192197
}
193198

0 commit comments

Comments
 (0)