mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-02-15 03:30:53 +01:00
Speed up DirLoader.DirLoader on Windows.
New FileHelper.TryOpenFileRead that doesn't throw if the file doesn't exist. Also used it in a couple other spots.
This commit is contained in:
@@ -895,12 +895,10 @@ namespace Robust.Shared.ContentPack
|
||||
{
|
||||
var path = Path.Combine(diskLoadPath, dllName);
|
||||
|
||||
if (!File.Exists(path))
|
||||
{
|
||||
if (!FileHelper.TryOpenFileRead(path, out var fileStream))
|
||||
continue;
|
||||
}
|
||||
|
||||
return ModLoader.MakePEReader(File.OpenRead(path));
|
||||
return ModLoader.MakePEReader(fileStream);
|
||||
}
|
||||
|
||||
foreach (var resLoadPath in _resLoadPaths)
|
||||
|
||||
Reference in New Issue
Block a user