| 299 | m_finishEvent.remove(token); |
| 300 | } |
| 301 | RobocopyArgs RobocopyViewModel::getRobocopyArg() |
| 302 | { |
| 303 | RobocopyArgs args; |
| 304 | args.destinationDir = m_destination; |
| 305 | args.moveFilesAndDirs.value = (m_recordFile->GetOperation() == CopyOperation::Move); |
| 306 | if (std::filesystem::is_directory(**m_iter)) |
| 307 | { |
| 308 | args.sourceDir = **m_iter; |
| 309 | args.destinationDir += L"\\" + std::filesystem::path{ **m_iter }.filename().wstring(); |
| 310 | args.copySubDirectoriesIncludeEmpty.value = true; |
| 311 | } |
| 312 | else |
| 313 | { |
| 314 | std::filesystem::path path{ **m_iter }; |
| 315 | args.sourceDir = path.parent_path().wstring(); |
| 316 | args.files.push_back(path.filename().wstring()); |
| 317 | } |
| 318 | return args; |
| 319 | } |
| 320 | |
| 321 | bool RobocopyViewModel::canUseRobocopy() const |
| 322 | { |
nothing calls this directly
no test coverage detected