fix: update path to debug settings file

The path wasn't taking into account running on VC-4, which was causing exceptions when Essentials was running on VC-4
This commit is contained in:
Andrew Welker
2022-11-04 09:13:19 -06:00
parent 89c503c636
commit 4890b167ab

View File

@@ -518,11 +518,16 @@ namespace PepperDash.Core
/// Helper to get the file path for this app's debug memory /// Helper to get the file path for this app's debug memory
/// </summary> /// </summary>
static string GetMemoryFileName() static string GetMemoryFileName()
{
if (CrestronEnvironment.DevicePlatform == eDevicePlatform.Appliance)
{ {
CheckForMigration(); CheckForMigration();
return string.Format(@"\user\debugSettings\program{0}", InitialParametersClass.ApplicationNumber); return string.Format(@"\user\debugSettings\program{0}", InitialParametersClass.ApplicationNumber);
} }
return string.Format("", InitialParametersClass.RoomId);
}
private static void CheckForMigration() private static void CheckForMigration()
{ {
var oldFilePath = String.Format(@"\nvram\debugSettings\program{0}", InitialParametersClass.ApplicationNumber); var oldFilePath = String.Format(@"\nvram\debugSettings\program{0}", InitialParametersClass.ApplicationNumber);