| 54 | } |
| 55 | |
| 56 | std::wstring Command::RecordFile() |
| 57 | { |
| 58 | auto& args = GetCommandArgs(); |
| 59 | if (args.size() == 1) |
| 60 | { |
| 61 | return std::filesystem::is_empty(GetLocalDataFolder().data()) ? |
| 62 | L"" : |
| 63 | std::filesystem::directory_iterator{ GetLocalDataFolder().data() }->path().wstring(); |
| 64 | } |
| 65 | else |
| 66 | { |
| 67 | auto result = args[1].substr(args[1].find(L"|") + 1); |
| 68 | for (int i = 2; i < args.size(); ++i) |
| 69 | { |
| 70 | result += L" "; |
| 71 | result += args[i]; |
| 72 | } |
| 73 | return result.substr(0, result.find_last_not_of(L"/\\ ") + 1); |
| 74 | } |
| 75 | } |
no test coverage detected