aboutsummaryrefslogtreecommitdiff
path: root/base/main.cpp
diff options
context:
space:
mode:
authorAlyssa Milburn2011-08-17 09:28:51 +0200
committerAlyssa Milburn2011-08-17 09:28:51 +0200
commitae287ccee58ebf68ab6125e5bbb4d8a44874330e (patch)
tree2f4cee4b2940466b8a578962e0174c6f89077a40 /base/main.cpp
parentf5255288eabc0527c4c6b727a9db6b8d09a31206 (diff)
parente36832bbf84cba88fe6b17e1634fab0d550f13df (diff)
downloadscummvm-rg350-ae287ccee58ebf68ab6125e5bbb4d8a44874330e.tar.gz
scummvm-rg350-ae287ccee58ebf68ab6125e5bbb4d8a44874330e.tar.bz2
scummvm-rg350-ae287ccee58ebf68ab6125e5bbb4d8a44874330e.zip
Merge remote-tracking branch 'origin/master' into soccer
Conflicts: engines/scumm/he/logic_he.cpp engines/scumm/he/logic_he.h
Diffstat (limited to 'base/main.cpp')
-rw-r--r--base/main.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/base/main.cpp b/base/main.cpp
index 780015d307..a0792a9ad2 100644
--- a/base/main.cpp
+++ b/base/main.cpp
@@ -186,9 +186,15 @@ static Common::Error runGame(const EnginePlugin *plugin, OSystem &system, const
}
// If a second extrapath is specified on the app domain level, add that as well.
+ // However, since the default hasKey() and get() check the app domain level,
+ // verify that it's not already there before adding it. The search manager will
+ // check for that too, so this check is mostly to avoid a warning message.
if (ConfMan.hasKey("extrapath", Common::ConfigManager::kApplicationDomain)) {
- dir = Common::FSNode(ConfMan.get("extrapath", Common::ConfigManager::kApplicationDomain));
- SearchMan.addDirectory(dir.getPath(), dir);
+ Common::String extraPath = ConfMan.get("extrapath", Common::ConfigManager::kApplicationDomain);
+ if (!SearchMan.hasArchive(extraPath)) {
+ dir = Common::FSNode(extraPath);
+ SearchMan.addDirectory(dir.getPath(), dir);
+ }
}
// On creation the engine should have set up all debug levels so we can use