From 0582c7dcfa14ebe44bddd5d1b23594e60171579c Mon Sep 17 00:00:00 2001 From: toxalph <> Date: Thu, 6 Feb 2025 10:09:57 +1100 Subject: [PATCH] Allow test client cd command to use spaces --- .../Commands/Inventory/ChangeDirectoryCommand.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Programs/examples/TestClient/Commands/Inventory/ChangeDirectoryCommand.cs b/Programs/examples/TestClient/Commands/Inventory/ChangeDirectoryCommand.cs index a698c49b..80beb447 100644 --- a/Programs/examples/TestClient/Commands/Inventory/ChangeDirectoryCommand.cs +++ b/Programs/examples/TestClient/Commands/Inventory/ChangeDirectoryCommand.cs @@ -16,8 +16,6 @@ public override string Execute(string[] args, UUID fromAgentID) { Inventory = Client.Inventory.Store; - if (args.Length > 1) - return "Usage: cd [path-to-folder]"; string pathStr = ""; string[] path = null; if (args.Length == 0) @@ -31,6 +29,11 @@ public override string Execute(string[] args, UUID fromAgentID) path = pathStr.Split(new[] { '/' }); // Use '/' as a path seperator. } + else + { + pathStr = System.String.Join(" ", args); + path = pathStr.Split(new[] { '/' }); + } InventoryFolder currentFolder = Client.CurrentDirectory; if (pathStr.StartsWith("/")) currentFolder = Inventory.RootFolder;