Skip to content

Commit

Permalink
Fixed Merge Issues
Browse files Browse the repository at this point in the history
  • Loading branch information
HerpDerpinstine committed Oct 15, 2024
1 parent 1f8c558 commit db47c39
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions MelonLoader/Resolver/AssemblyManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ private static Assembly Resolve(string requested_name, Version requested_version
assembly = MelonAssemblyResolver.SafeInvoke_OnAssemblyResolve(requested_name, requested_version);

// Search Directories
if (is_preload && assembly == null)
if (is_preload && (assembly == null))
assembly = SearchDirectoryManager.Scan(requested_name);

// Load if Valid Assembly
Expand Down Expand Up @@ -77,7 +77,7 @@ internal static void LoadInfo(Assembly assembly)

#if NET6_0_OR_GREATER

private static Assembly Resolve(AssemblyLoadContext alc, AssemblyName name)
private static Assembly? Resolve(AssemblyLoadContext alc, AssemblyName name)
=> Resolve(name.Name, name.Version, true);

private static void InstallHooks()
Expand Down
10 changes: 5 additions & 5 deletions MelonLoader/Resolver/SearchDirectoryManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,11 @@ internal static Assembly Scan(string requested_name)
continue;

string filepath = Directory.GetFiles(folderpath).Where(x =>
!string.IsNullOrEmpty(x)
&& (Path.GetExtension(x).ToLowerInvariant().Equals(".dll")
&& Path.GetFileName(x).Equals($"{requested_name}.dll")
|| Path.GetExtension(x).ToLowerInvariant().Equals(".exe")
&& Path.GetFileName(x).Equals($"{requested_name}.exe"))
(!string.IsNullOrEmpty(x)
&& ((Path.GetExtension(x).ToLowerInvariant().Equals(".dll")
&& Path.GetFileName(x).Equals($"{requested_name}.dll"))
|| (Path.GetExtension(x).ToLowerInvariant().Equals(".exe")
&& Path.GetFileName(x).Equals($"{requested_name}.exe"))))
).FirstOrDefault();

if (string.IsNullOrEmpty(filepath))
Expand Down

0 comments on commit db47c39

Please sign in to comment.