From 08bbe0606bf56d34c41d6f7f2b1173b84247305e Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Fri, 6 Mar 2009 14:22:50 +0000 Subject: AclPlugin: Use --acl-file unmodified if --no-data-dir. SessionId: print as userid.sessionid rather than sessionid@userid. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@750913 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/acl/AclPlugin.cpp | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'cpp/src/qpid/acl/AclPlugin.cpp') diff --git a/cpp/src/qpid/acl/AclPlugin.cpp b/cpp/src/qpid/acl/AclPlugin.cpp index 7310139041..4c6efa19dd 100644 --- a/cpp/src/qpid/acl/AclPlugin.cpp +++ b/cpp/src/qpid/acl/AclPlugin.cpp @@ -62,15 +62,10 @@ struct AclPlugin : public Plugin { if (acl) throw Exception("ACL plugin cannot be initialized twice in one process."); - if (values.aclFile.at(0) == '/') - { - values.aclFile = values.aclFile; - } - else - { - std::ostringstream oss; - oss << b.getDataDir().getPath() << "/" << values.aclFile; - values.aclFile = oss.str(); + if (values.aclFile.at(0) != '/' && !b.getDataDir().getPath().empty()) { + std::ostringstream oss; + oss << b.getDataDir().getPath() << "/" << values.aclFile; + values.aclFile = oss.str(); } acl = new Acl(values, b); -- cgit v1.2.1