| 420 | } |
| 421 | |
| 422 | Value MacroProcessor::EscapeMacroShellArg(const Value& value) |
| 423 | { |
| 424 | String result; |
| 425 | |
| 426 | if (value.IsObjectType<Array>()) { |
| 427 | Array::Ptr arr = value; |
| 428 | |
| 429 | ObjectLock olock(arr); |
| 430 | for (const Value& arg : arr) { |
| 431 | if (result.GetLength() > 0) |
| 432 | result += " "; |
| 433 | |
| 434 | result += Utility::EscapeShellArg(arg); |
| 435 | } |
| 436 | } else |
| 437 | result = Utility::EscapeShellArg(value); |
| 438 | |
| 439 | return result; |
| 440 | } |
| 441 | |
| 442 | struct CommandArgument |
| 443 | { |