From cf6581d01c107a9402764cd275d2621da28adfc1 Mon Sep 17 00:00:00 2001 From: tomas-sexenian Date: Thu, 14 Sep 2023 19:15:52 -0300 Subject: [PATCH] Remove debugger call and use temp media path as gxfile destination --- dotnet/src/dotnetframework/GxClasses/Core/GXUtilsCommon.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dotnet/src/dotnetframework/GxClasses/Core/GXUtilsCommon.cs b/dotnet/src/dotnetframework/GxClasses/Core/GXUtilsCommon.cs index da25b3524..5453d4aea 100644 --- a/dotnet/src/dotnetframework/GxClasses/Core/GXUtilsCommon.cs +++ b/dotnet/src/dotnetframework/GxClasses/Core/GXUtilsCommon.cs @@ -6054,7 +6054,6 @@ public static string FlipVertically(string imageFile) public static string Save(Image bitmap, string imageFile, ImageFormat format) { - System.Diagnostics.Debugger.Launch(); string destinationImagePath = string.Empty; using (MemoryStream ms = new MemoryStream()) { @@ -6077,8 +6076,9 @@ public static string Save(Image bitmap, string imageFile, ImageFormat format) imageFile = Path.GetFileName(uri.AbsolutePath); } GxFile sourceImage = new GxFile(GxContext.StaticPhysicalPath(), imageFile); - string destinationImageName = FileUtil.getTempFileName(Preferences.getTMP_MEDIA_PATH(), Path.GetFileNameWithoutExtension(sourceImage.GetName()), sourceImage.GetExtension()); - GxFile destinationImage = new GxFile(GxContext.StaticPhysicalPath(), destinationImageName); + string tempDirectory = Preferences.getTMP_MEDIA_PATH(); + string destinationImageName = FileUtil.getTempFileName(tempDirectory, Path.GetFileNameWithoutExtension(sourceImage.GetName()), sourceImage.GetExtension()); + GxFile destinationImage = new GxFile(tempDirectory, destinationImageName); destinationImage.Create(ms); destinationImage.Close(); destinationImagePath = destinationImage.GetAbsoluteName();