From 1e733cba7ff63dbfae8bddd2e1978f3a3e920d23 Mon Sep 17 00:00:00 2001 From: James South Date: Mon, 7 Jul 2014 16:55:18 +0100 Subject: [PATCH] Small tweak to unmanaged loader STILL DOESN'T WORK!!! Former-commit-id: 7e2e3499f1ba0c2685f15892f156d383523e198a --- .../NET45/HttpModules/ImageProcessorNativeBinaryModule.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ImageProcessor.Web/NET45/HttpModules/ImageProcessorNativeBinaryModule.cs b/src/ImageProcessor.Web/NET45/HttpModules/ImageProcessorNativeBinaryModule.cs index 87120a77b..57f8cfdc0 100644 --- a/src/ImageProcessor.Web/NET45/HttpModules/ImageProcessorNativeBinaryModule.cs +++ b/src/ImageProcessor.Web/NET45/HttpModules/ImageProcessorNativeBinaryModule.cs @@ -109,7 +109,8 @@ namespace ImageProcessor.Web.HttpModules string folder = Is64Bit ? "x64" : "x86"; 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); if (directoryInfo.Exists) @@ -120,6 +121,7 @@ namespace ImageProcessor.Web.HttpModules { IntPtr pointer; string targetPath = Path.GetFullPath(Path.Combine(targetBasePath, "..\\" + folder + "\\" + fileInfo.Name)); + File.Copy(sourcePath, targetPath, true); try