From f248ef8579fdd8163625095689229c3ac6afd596 Mon Sep 17 00:00:00 2001 From: jtalborough Date: Tue, 25 Feb 2025 18:53:40 -0500 Subject: [PATCH] fix: update debug settings path handling for improved directory structure and support for multiple target frameworks --- src/Pepperdash Core/Logging/Debug.cs | 10 +++++++--- src/Pepperdash Core/PepperDash_Core.csproj | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/Pepperdash Core/Logging/Debug.cs b/src/Pepperdash Core/Logging/Debug.cs index 4e79a60..6500501 100644 --- a/src/Pepperdash Core/Logging/Debug.cs +++ b/src/Pepperdash Core/Logging/Debug.cs @@ -823,11 +823,15 @@ namespace PepperDash.Core { if (CrestronEnvironment.DevicePlatform == eDevicePlatform.Appliance) { - // CheckForMigration(); - return string.Format(@"\user\debugSettings\program{0}", InitialParametersClass.ApplicationNumber); + // Use fully qualified name for System.IO.Path + string baseDir = Directory.GetApplicationRootDirectory(); + string userDir = System.IO.Path.Combine(baseDir, "user"); + string debugSettingsDir = System.IO.Path.Combine(userDir, "debugSettings"); + return System.IO.Path.Combine(debugSettingsDir, $"program{InitialParametersClass.ApplicationNumber}"); } - return string.Format("{0}{1}user{1}debugSettings{1}{2}.json",Directory.GetApplicationRootDirectory(), Path.DirectorySeparatorChar, InitialParametersClass.RoomId); + return string.Format("{0}{1}user{1}debugSettings{1}{2}.json", + Directory.GetApplicationRootDirectory(), Path.DirectorySeparatorChar, InitialParametersClass.RoomId); } private static void CheckForMigration() diff --git a/src/Pepperdash Core/PepperDash_Core.csproj b/src/Pepperdash Core/PepperDash_Core.csproj index 28f17de..ae44062 100644 --- a/src/Pepperdash Core/PepperDash_Core.csproj +++ b/src/Pepperdash Core/PepperDash_Core.csproj @@ -2,7 +2,7 @@ PepperDash.Core PepperDashCore - net8 + net6;net8 true en bin\$(Configuration)\