| 5096 | } |
| 5097 | |
| 5098 | std::string DiffInfo::getProgramForOs() const |
| 5099 | { |
| 5100 | std::string result = program; |
| 5101 | if (result.rfind(programFileTemplate(), 0) == 0) |
| 5102 | { |
| 5103 | std::vector<std::string> possibleWindowsPaths = getProgramFileLocations(); |
| 5104 | for (const auto& path : possibleWindowsPaths) |
| 5105 | { |
| 5106 | auto result1 = |
| 5107 | StringUtils::replaceAll(result, programFileTemplate(), path); |
| 5108 | if (FileUtils::fileExists(result1)) |
| 5109 | { |
| 5110 | return result1; |
| 5111 | } |
| 5112 | } |
| 5113 | } |
| 5114 | return result; |
| 5115 | } |
| 5116 | } |
| 5117 | |
| 5118 | // ******************** From: DiffPrograms.cpp |