summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-10-04 21:00:06 +0300
committerAndrei Karas <akaras@inbox.ru>2014-10-04 21:00:06 +0300
commitdb821a964c9a7f96222b00e6b41f91ba3384e29a (patch)
tree7094c6e0b4d07e24abcb3713e748f0dc0c851fe2 /src
parent95bc78e4bfa8f084266da85dbafab4ec56507bb9 (diff)
downloadmanaverse-db821a964c9a7f96222b00e6b41f91ba3384e29a.tar.gz
manaverse-db821a964c9a7f96222b00e6b41f91ba3384e29a.tar.bz2
manaverse-db821a964c9a7f96222b00e6b41f91ba3384e29a.tar.xz
manaverse-db821a964c9a7f96222b00e6b41f91ba3384e29a.zip
Fix dir for updates if server not give any update servers.
Diffstat (limited to 'src')
-rw-r--r--src/dirs.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/dirs.cpp b/src/dirs.cpp
index eb636c86c..4e8ba1efc 100644
--- a/src/dirs.cpp
+++ b/src/dirs.cpp
@@ -338,7 +338,14 @@ void Dirs::initUpdatesDir()
// Don't go out of range int he next check
if (settings.updateHost.length() < 2)
+ {
+ if (settings.updatesDir.empty())
+ {
+ settings.updatesDir = std::string("updates/").append(
+ settings.serverName);
+ }
return;
+ }
const size_t sz = settings.updateHost.size();
// Remove any trailing slash at the end of the update host