Skip to content

Commit

Permalink
Fix getPRINT_LAYOUT_METADATA_DIR method to use the appropriate intern…
Browse files Browse the repository at this point in the history
…al variable, as it was previously referencing mediaPath from the TMP_MEDIA_PATH setting
  • Loading branch information
claudiamurialdo committed Nov 5, 2024
1 parent f2bf5bf commit e6b0e2d
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions dotnet/src/dotnetframework/GxClasses/Core/gxconfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -835,6 +835,7 @@ public class Preferences
static int oldSTR = -1;
static int instrumented = -1;
static string mediaPath;
static string layoutMetadataPath;
static string pdfLib;
static string blobPath;
static string blobPathFolderName;
Expand Down Expand Up @@ -1234,30 +1235,30 @@ public static string getTMP_MEDIA_PATH()
}
public static string getPRINT_LAYOUT_METADATA_DIR()
{
if (mediaPath == null)
if (layoutMetadataPath == null)
{
lock (syncRoot)
{
if (mediaPath == null)
if (layoutMetadataPath == null)
{
if (Config.GetValueOf("PRINT_LAYOUT_METADATA_DIR", out mediaPath))
if (Config.GetValueOf("PRINT_LAYOUT_METADATA_DIR", out layoutMetadataPath))
{
mediaPath = mediaPath.Trim();
layoutMetadataPath = layoutMetadataPath.Trim();

if (!String.IsNullOrEmpty(mediaPath) && !mediaPath.EndsWith("\\") && !mediaPath.EndsWith("/"))
if (!String.IsNullOrEmpty(layoutMetadataPath) && !layoutMetadataPath.EndsWith("\\") && !layoutMetadataPath.EndsWith("/"))
{
mediaPath += Path.DirectorySeparatorChar;
layoutMetadataPath += Path.DirectorySeparatorChar;
}
}
else
{
mediaPath = "";
layoutMetadataPath = string.Empty;
}
GXLogging.Debug(log, "PRINT_LAYOUT_METADATA_DIR:", mediaPath);
GXLogging.Debug(log, "PRINT_LAYOUT_METADATA_DIR:", layoutMetadataPath);
}
}
}
return mediaPath;
return layoutMetadataPath;
}
internal static string PdfReportLibrary()
{
Expand Down

0 comments on commit e6b0e2d

Please sign in to comment.