| 259 | // |
| 260 | |
| 261 | bool FileSystemMRM::getRealPath(const char possiblePath[MAXPATHLEN], char realPath[MAXPATHLEN]) const |
| 262 | { |
| 263 | Diagnostics diag; |
| 264 | std::string resolvedPath = symlinkResolver.realPath(diag, possiblePath); |
| 265 | if (diag.hasError()) { |
| 266 | diag.verbose("MRM error: %s\n", diag.errorMessage().c_str()); |
| 267 | diag.clearError(); |
| 268 | return false; |
| 269 | } |
| 270 | |
| 271 | // FIXME: Should we only return real paths of files which point to macho's? For now that is what we are doing |
| 272 | auto it = fileMap.find(resolvedPath); |
| 273 | if (it == fileMap.end()) |
| 274 | return false; |
| 275 | |
| 276 | memcpy(realPath, resolvedPath.c_str(), std::min((size_t)MAXPATHLEN, resolvedPath.size() + 1)); |
| 277 | return true; |
| 278 | } |
| 279 | |
| 280 | bool FileSystemMRM::loadFile(const char* path, dyld3::closure::LoadedFileInfo& info, |
| 281 | char realerPath[MAXPATHLEN], void (^error)(const char* format, ...)) const |
no test coverage detected