summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/Ice/PropertiesI.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/cpp/src/Ice/PropertiesI.cpp b/cpp/src/Ice/PropertiesI.cpp
index 9b72c78c51d..b1dc6c20128 100644
--- a/cpp/src/Ice/PropertiesI.cpp
+++ b/cpp/src/Ice/PropertiesI.cpp
@@ -262,6 +262,8 @@ Ice::PropertiesI::PropertiesI(StringSeq& args, const PropertiesPtr& defaults)
setProperty("Ice.ProgramName", name);
}
StringSeq tmp;
+
+ bool loadConfigFiles = false;
while(q != args.end())
{
string s = *q;
@@ -272,6 +274,7 @@ Ice::PropertiesI::PropertiesI(StringSeq& args, const PropertiesPtr& defaults)
s += "=1";
}
parseLine(s.substr(2));
+ loadConfigFiles = true;
}
else
{
@@ -281,7 +284,18 @@ Ice::PropertiesI::PropertiesI(StringSeq& args, const PropertiesPtr& defaults)
}
args = tmp;
- loadConfig();
+ if(!loadConfigFiles)
+ {
+ //
+ // If Ice.Config is not set, load from ICE_CONFIG (if set)
+ //
+ loadConfigFiles = (_properties.find("Ice.Config") == _properties.end());
+ }
+
+ if(loadConfigFiles)
+ {
+ loadConfig();
+ }
args = parseIceCommandLineOptions(args);
}