| 249 | |
| 250 | #if !defined(_WIN32) |
| 251 | bool Realpath(const std::string& path, std::string* result) { |
| 252 | result->clear(); |
| 253 | |
| 254 | char* realpath_buf = realpath(path.c_str(), nullptr); |
| 255 | if (realpath_buf == nullptr) { |
| 256 | return false; |
| 257 | } |
| 258 | result->assign(realpath_buf); |
| 259 | free(realpath_buf); |
| 260 | return true; |
| 261 | } |
| 262 | #endif |
| 263 | |
| 264 | std::string GetExecutablePath() { |