| 181 | } |
| 182 | |
| 183 | void FileInfo::setFile(std::string name) |
| 184 | { |
| 185 | if (name.empty()) { |
| 186 | FileName.clear(); |
| 187 | return; |
| 188 | } |
| 189 | |
| 190 | FileName = std::move(name); |
| 191 | |
| 192 | // keep the UNC paths intact |
| 193 | if (FileName.substr(0, 2) == std::string("\\\\")) { |
| 194 | std::replace(FileName.begin() + 2, FileName.end(), '\\', '/'); |
| 195 | } |
| 196 | else { |
| 197 | std::replace(FileName.begin(), FileName.end(), '\\', '/'); |
| 198 | } |
| 199 | } |
| 200 | |
| 201 | std::string FileInfo::filePath() const |
| 202 | { |
no test coverage detected