| 232 | } |
| 233 | |
| 234 | std::vector<cache_builder::FileAlias> SymlinkResolver::getIntermediateSymlinks() const |
| 235 | { |
| 236 | auto unusedCallback = ^(const std::string& error) { }; |
| 237 | std::vector<cache_builder::FileAlias> aliases = this->getResolvedSymlinks(unusedCallback); |
| 238 | |
| 239 | std::vector<cache_builder::FileAlias> intermediateAliases; |
| 240 | for ( const cache_builder::FileAlias& alias : aliases ) { |
| 241 | Diagnostics diag; |
| 242 | |
| 243 | __block std::vector<std::string> seenSymlinks; |
| 244 | auto callback = ^(const std::string& intermediateSymlink) { |
| 245 | seenSymlinks.push_back(intermediateSymlink); |
| 246 | }; |
| 247 | std::string realPath = this->realPath(diag, alias.aliasPath, callback); |
| 248 | |
| 249 | for ( const std::string& intermediateSymlink : seenSymlinks ) { |
| 250 | intermediateAliases.push_back({ alias.realPath, intermediateSymlink }); |
| 251 | } |
| 252 | } |
| 253 | |
| 254 | return intermediateAliases; |
| 255 | } |
| 256 | |
| 257 | // |
| 258 | // MARK: --- FileSystemMRM methods --- |
no test coverage detected