diff --git a/ShareX.HelpersLib/Helpers/ImageHelpers.cs b/ShareX.HelpersLib/Helpers/ImageHelpers.cs index ac8f67da6..82c7033bf 100644 --- a/ShareX.HelpersLib/Helpers/ImageHelpers.cs +++ b/ShareX.HelpersLib/Helpers/ImageHelpers.cs @@ -1543,7 +1543,6 @@ public static string SaveImageFileDialog(Image img, string filePath = "") return null; } - // http://stackoverflow.com/questions/788335/why-does-image-fromfile-keep-a-file-handle-open-sometimes public static Image LoadImage(string filePath) { try @@ -1554,6 +1553,7 @@ public static Image LoadImage(string filePath) if (!string.IsNullOrEmpty(filePath) && Helpers.IsImageFile(filePath) && File.Exists(filePath)) { + // http://stackoverflow.com/questions/788335/why-does-image-fromfile-keep-a-file-handle-open-sometimes Image img = Image.FromStream(new MemoryStream(File.ReadAllBytes(filePath))); if (HelpersOptions.RotateImageByExifOrientationData) diff --git a/ShareX.Setup/Program.cs b/ShareX.Setup/Program.cs index 07575ced7..495cc9b5c 100644 --- a/ShareX.Setup/Program.cs +++ b/ShareX.Setup/Program.cs @@ -96,6 +96,7 @@ private enum SetupJobs public static string InnoSetupCompilerPath = @"C:\Program Files (x86)\Inno Setup 5\ISCC.exe"; public static string FFmpeg32bit => Path.Combine(ParentDir, "Lib", "ffmpeg.exe"); public static string FFmpeg64bit => Path.Combine(ParentDir, "Lib", "ffmpeg-x64.exe"); + public static string MakeAppxPath = @"C:\Program Files (x86)\Windows Kits\10\bin\x64\makeappx.exe"; private static void Main(string[] args) { @@ -177,7 +178,7 @@ private static void Main(string[] args) { StartInfo = new ProcessStartInfo { - FileName = @"C:\Program Files (x86)\Windows Kits\10\bin\x64\makeappx.exe", + FileName = MakeAppxPath, Arguments = $"pack /d \"{WindowsStoreOutputDir}\" /p \"{WindowsStoreAppxPath}\" /l /o", UseShellExecute = false, RedirectStandardOutput = true