diff --git a/src/build/libroot/fs.cpp b/src/build/libroot/fs.cpp index 5a9ebdfb09..d15aca0053 100644 --- a/src/build/libroot/fs.cpp +++ b/src/build/libroot/fs.cpp @@ -411,6 +411,18 @@ BPrivate::get_path(int fd, const char *name, string &path) if (!descriptor) return B_FILE_ERROR; + // Handle symlink descriptors here explicitly, so this function can be + // used more flexibly. + if (SymlinkDescriptor* symlinkDescriptor + = dynamic_cast(descriptor)) { + path = symlinkDescriptor->path; + if (name == NULL) + return B_OK; + path += '/'; + path += name; + return B_OK; + } + // get node ref for the descriptor NodeRef ref; status_t error = descriptor->GetNodeRef(ref);