* Appends, if necessary, the path separator character to the end of the string. * It does not add the path separator to zero-sized strings. * @param buf string to append the separator to * @return true iff the operation succeeded */
| 346 | * @return true iff the operation succeeded |
| 347 | */ |
| 348 | void AppendPathSeparator(std::string &buf) |
| 349 | { |
| 350 | if (buf.empty()) return; |
| 351 | |
| 352 | if (buf.back() != PATHSEPCHAR) buf.push_back(PATHSEPCHAR); |
| 353 | } |
| 354 | |
| 355 | /** |
| 356 | * Simplify filenames from tars. |
no test coverage detected