diff --git a/src/DotRecast.Core/RcResources.cs b/src/DotRecast.Core/RcResources.cs index 5e63c9d..2b33f7c 100644 --- a/src/DotRecast.Core/RcResources.cs +++ b/src/DotRecast.Core/RcResources.cs @@ -6,7 +6,12 @@ namespace DotRecast.Core { public static byte[] Load(string filename) { - var filepath = RcDirectory.SearchFile($"resources/{filename}"); + var filepath = filename; + if (!File.Exists(filepath)) + { + filepath = RcDirectory.SearchFile($"resources/{filename}"); + } + using var fs = new FileStream(filepath, FileMode.Open, FileAccess.Read, FileShare.Read); byte[] buffer = new byte[fs.Length]; fs.Read(buffer, 0, buffer.Length);