summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2008-07-17 23:08:17 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2008-07-17 23:08:17 +0000
commitc8db8fbd71727b601172225f81c6198dc96d57db (patch)
tree906d70a22b9e1df0010310356da7b82698f6cb87
parentea37ffc6d73bb0de686c29f8e8c6769f2a704ec5 (diff)
downloadmana-c8db8fbd71727b601172225f81c6198dc96d57db.tar.gz
mana-c8db8fbd71727b601172225f81c6198dc96d57db.tar.bz2
mana-c8db8fbd71727b601172225f81c6198dc96d57db.tar.xz
mana-c8db8fbd71727b601172225f81c6198dc96d57db.zip
Remove possible trailing slash at the end of the update host, since otherwise
there'll be two of them.
-rw-r--r--ChangeLog5
-rw-r--r--src/main.cpp4
2 files changed, 9 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index d7d47e54..30665053 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-07-18 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * src/main.cpp: Remove possible trailing slash at the end of the
+ update host, since otherwise there'll be two of them.
+
2008-07-16 Lloyd Bryant <lloyd_bryant@netzero.net>
* src/logindata.h, src/gui/char_server.cpp, src/gui/char_server.h,
diff --git a/src/main.cpp b/src/main.cpp
index e13ee390..bc3d5449 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -162,6 +162,10 @@ void setUpdatesDir()
config.getValue("updatehost", "http://updates.thanaworld.org");
}
+ // Remove any trailing slash at the end of the update host
+ if (updateHost.at(updateHost.size() - 1) == '/')
+ updateHost.resize(updateHost.size() - 1);
+
// Parse out any "http://" or "ftp://", and set the updates directory
size_t pos;
pos = updateHost.find("://");