Browse Source

Small tweak to unmanaged loader

STILL DOESN'T WORK!!!


Former-commit-id: 7e2e3499f1ba0c2685f15892f156d383523e198a
af/merge-core
James South 12 years ago
parent
commit
1e733cba7f
  1. 4
      src/ImageProcessor.Web/NET45/HttpModules/ImageProcessorNativeBinaryModule.cs

4
src/ImageProcessor.Web/NET45/HttpModules/ImageProcessorNativeBinaryModule.cs

@ -109,7 +109,8 @@ namespace ImageProcessor.Web.HttpModules
string folder = Is64Bit ? "x64" : "x86"; string folder = Is64Bit ? "x64" : "x86";
string sourcePath = HttpContext.Current.Server.MapPath("~/bin/" + folder); string sourcePath = HttpContext.Current.Server.MapPath("~/bin/" + folder);
string targetBasePath = new Uri(Assembly.GetExecutingAssembly().Location).LocalPath; Assembly assembly = Assembly.GetExecutingAssembly();
string targetBasePath = new Uri(assembly.Location).LocalPath;
DirectoryInfo directoryInfo = new DirectoryInfo(sourcePath); DirectoryInfo directoryInfo = new DirectoryInfo(sourcePath);
if (directoryInfo.Exists) if (directoryInfo.Exists)
@ -120,6 +121,7 @@ namespace ImageProcessor.Web.HttpModules
{ {
IntPtr pointer; IntPtr pointer;
string targetPath = Path.GetFullPath(Path.Combine(targetBasePath, "..\\" + folder + "\\" + fileInfo.Name)); string targetPath = Path.GetFullPath(Path.Combine(targetBasePath, "..\\" + folder + "\\" + fileInfo.Name));
File.Copy(sourcePath, targetPath, true); File.Copy(sourcePath, targetPath, true);
try try

Loading…
Cancel
Save