Skip to content

Commit

Permalink
Changed: Logic to determine current DLL path, given strange report of…
Browse files Browse the repository at this point in the history
… failure on user machine.
  • Loading branch information
Sewer56 committed Mar 3, 2024
1 parent 63f3c0a commit 8b8eee1
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions Source/Reloaded.Assembler/Assembler.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
Expand Down Expand Up @@ -199,16 +199,10 @@ private string GetFasmDLLPath()
throw new FasmWrapperException("Appropriate FASM DLL for X86/64 has not been found in either current or library directory.");
}

/// <summary>
/// Gets the directory of the currently executing assembly.
/// </summary>
private string GetExecutingDLLDirectory()
{
string codeBase = Assembly.GetExecutingAssembly().CodeBase;
UriBuilder uri = new UriBuilder(codeBase);
string path = Uri.UnescapeDataString(uri.Path);
return Path.GetDirectoryName(path);
}
/// <summary>
/// Gets the directory of the currently executing assembly.
/// </summary>
private string GetExecutingDLLDirectory() => Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);

/// <summary>
/// Attempts to allocate the memory to store the text to be supplied to FASM assembler.
Expand Down

0 comments on commit 8b8eee1

Please sign in to comment.