| 185 | bool PboCommand::CreateDirectories(const std::string& path) |
| 186 | { |
| 187 | if (path.empty()) |
| 188 | return true; |
| 189 | struct stat st; |
| 190 | if (stat(path.c_str(), &st) == 0) |
| 191 | return true; |
| 192 | auto pos = path.find_last_of("/\\"); |
| 193 | if (pos != std::string::npos && pos > 0) |
| 194 | { |
| 195 | if (!CreateDirectories(path.substr(0, pos))) |
| 196 | return false; |
| 197 | } |
nothing calls this directly
no test coverage detected