| 133 | } |
| 134 | |
| 135 | std::string join_path(const std::string& path, const std::string& file) |
| 136 | { |
| 137 | std::string result(path); |
| 138 | |
| 139 | // Add a separator at the end if it is necessay |
| 140 | if (!result.empty() && !is_path_separator(*(result.end()-1))) |
| 141 | result.push_back(path_separator); |
| 142 | |
| 143 | // Add the file |
| 144 | result += file; |
| 145 | return result; |
| 146 | } |
| 147 | |
| 148 | std::string remove_path_separator(const std::string& path) |
| 149 | { |