From 0a7efcb4301672dc8226da9c7d91f8bbca3f2988 Mon Sep 17 00:00:00 2001 From: Dunbaratu Date: Mon, 26 Oct 2020 10:57:45 -0500 Subject: [PATCH] fixed it exactly as explained in issue #2774 Fixes #2774 --- src/kOS.Safe/Function/Persistence.cs | 10 ++++------ src/kOS/Suffixed/FlightControl.cs | 1 - 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/kOS.Safe/Function/Persistence.cs b/src/kOS.Safe/Function/Persistence.cs index 4be7508bc..59a248e96 100644 --- a/src/kOS.Safe/Function/Persistence.cs +++ b/src/kOS.Safe/Function/Persistence.cs @@ -1,4 +1,4 @@ -using kOS.Safe.Compilation; +using kOS.Safe.Compilation; using kOS.Safe.Encapsulation; using kOS.Safe.Exceptions; using kOS.Safe.Persistence; @@ -322,11 +322,9 @@ public override void Execute(SafeSharedObjects shared) VolumeItem volumeItem = volume.Open(path); if (volumeItem == null) - { - throw new KOSException("File or directory does not exist: " + path); - } - - ReturnValue = volumeItem; + ReturnValue = new BooleanValue(false); + else + ReturnValue = volumeItem; } } diff --git a/src/kOS/Suffixed/FlightControl.cs b/src/kOS/Suffixed/FlightControl.cs index 1d35fe488..362da80ee 100644 --- a/src/kOS/Suffixed/FlightControl.cs +++ b/src/kOS/Suffixed/FlightControl.cs @@ -308,7 +308,6 @@ private void PushNewSetting(ref FlightCtrlState st) if(Math.Abs(yawTrim) > SETTING_EPILSON) st.yawTrim = yawTrim; if(Math.Abs(pitchTrim) > SETTING_EPILSON) st.pitchTrim = pitchTrim; if(Math.Abs(rollTrim) > SETTING_EPILSON) st.rollTrim = rollTrim; - if(Math.Abs(starboard) > SETTING_EPILSON) st.X = Invert(starboard); if(Math.Abs(top) > SETTING_EPILSON) st.Y = top; if(Math.Abs(fore) > SETTING_EPILSON) st.Z = Invert(fore);