From e71ee4ca58b6349fe831df04572df414fd0d5fc0 Mon Sep 17 00:00:00 2001 From: cmurialdo Date: Sat, 4 Mar 2023 11:48:20 -0300 Subject: [PATCH] Create the temporary image in the same directory where the source image exists. --- dotnet/src/dotnetframework/GxClasses/Core/GXUtilsCommon.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dotnet/src/dotnetframework/GxClasses/Core/GXUtilsCommon.cs b/dotnet/src/dotnetframework/GxClasses/Core/GXUtilsCommon.cs index c5193a82a..4bbfb204d 100644 --- a/dotnet/src/dotnetframework/GxClasses/Core/GXUtilsCommon.cs +++ b/dotnet/src/dotnetframework/GxClasses/Core/GXUtilsCommon.cs @@ -5739,7 +5739,7 @@ public static string Save(Image bitmap, string imageFile, ImageFormat format) try { GxFile sourceImage = new GxFile(GxContext.StaticPhysicalPath(), imageFile); - string destinationImageName = FileUtil.getTempFileName(GxContext.StaticPhysicalPath(), Path.GetFileNameWithoutExtension(sourceImage.GetName()), sourceImage.GetExtension()); + string destinationImageName = FileUtil.getTempFileName(sourceImage.GetDirectory().GetAbsoluteName(), Path.GetFileNameWithoutExtension(sourceImage.GetName()), sourceImage.GetExtension()); GxFile destinationImage = new GxFile(GxContext.StaticPhysicalPath(), destinationImageName); destinationImage.Create(ms); destinationImage.Close();