Skip to content

Commit

Permalink
Allow test client cd command to use spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
toxalph committed Feb 5, 2025
1 parent 02c39ea commit 0582c7d
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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;
Expand Down

0 comments on commit 0582c7d

Please sign in to comment.