diff --git a/nanoFramework.Tools.DebugLibrary.Shared/WireProtocol/Commands.cs b/nanoFramework.Tools.DebugLibrary.Shared/WireProtocol/Commands.cs index e4a89be..cf92de9 100644 --- a/nanoFramework.Tools.DebugLibrary.Shared/WireProtocol/Commands.cs +++ b/nanoFramework.Tools.DebugLibrary.Shared/WireProtocol/Commands.cs @@ -643,6 +643,13 @@ public override bool PrepareForSend( return true; } + internal void PrepareForSend() + { + // add the file name to the data property buffer + Data = Encoding.UTF8.GetBytes(FileName); + NameLength = (uint)FileName.Length; + } + ////////////////////////////////////////////////////////////////////////////////////// // !!! KEEP IN SYNC WITH typedef enum Monitor_StorageOperation (in native code) !!! // ////////////////////////////////////////////////////////////////////////////////////// diff --git a/nanoFramework.Tools.DebugLibrary.Shared/WireProtocol/Engine.cs b/nanoFramework.Tools.DebugLibrary.Shared/WireProtocol/Engine.cs index d35e24e..b779123 100644 --- a/nanoFramework.Tools.DebugLibrary.Shared/WireProtocol/Engine.cs +++ b/nanoFramework.Tools.DebugLibrary.Shared/WireProtocol/Engine.cs @@ -4494,6 +4494,8 @@ public StorageOperationErrorCode DeleteStorageFile(string fileName) Commands.Monitor_StorageOperation.StorageOperation.Delete, fileName); + storop.PrepareForSend(); + IncomingMessage reply = PerformSyncRequest( Commands.c_Monitor_StorageOperation, 0,