Fix calculation of composite path when configured with an absolute path.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1221832 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
0093665342
commit
c9dc8128f1
3 changed files with 9 additions and 2 deletions
|
|
@ -208,6 +208,13 @@ const value propertyValue(const value& l) {
|
|||
return elementValue(l);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the absolute path of a resource in a contribution.
|
||||
*/
|
||||
const string resourcePath(const string& contrib, const string& path) {
|
||||
return c_str(path)[0] == '/'? path : contrib + path;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -741,7 +741,7 @@ const failable<bool> confComponents(ServerConf& sc) {
|
|||
if (sc.key != "") debug(sc.key, "modeval::confComponents::sslKey");
|
||||
|
||||
// Read the components and get their implementation lambda functions
|
||||
const failable<list<value> > comps = readComponents(sc.contributionPath + sc.compositeName);
|
||||
const failable<list<value> > comps = readComponents(scdl::resourcePath(sc.contributionPath, sc.compositeName));
|
||||
if (!hasContent(comps))
|
||||
return mkfailure<bool>(reason(comps));
|
||||
sc.implementations = componentToImplementationAssoc(sc, content(comps));
|
||||
|
|
|
|||
|
|
@ -265,7 +265,7 @@ const bool confComponents(ServerConf& sc) {
|
|||
|
||||
// Read the component configuration and store the references and service URIs
|
||||
// in trees for fast retrieval later
|
||||
const failable<list<value> > comps = readComponents(sc.contributionPath + sc.compositeName);
|
||||
const failable<list<value> > comps = readComponents(scdl::resourcePath(sc.contributionPath, sc.compositeName));
|
||||
if (!hasContent(comps))
|
||||
return true;
|
||||
const list<value> refs = componentReferenceToTargetAssoc(content(comps));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue