diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2008-07-17 23:08:17 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2008-07-17 23:08:17 +0000 |
commit | c8db8fbd71727b601172225f81c6198dc96d57db (patch) | |
tree | 906d70a22b9e1df0010310356da7b82698f6cb87 | |
parent | ea37ffc6d73bb0de686c29f8e8c6769f2a704ec5 (diff) | |
download | mana-client-c8db8fbd71727b601172225f81c6198dc96d57db.tar.gz mana-client-c8db8fbd71727b601172225f81c6198dc96d57db.tar.bz2 mana-client-c8db8fbd71727b601172225f81c6198dc96d57db.tar.xz mana-client-c8db8fbd71727b601172225f81c6198dc96d57db.zip |
Remove possible trailing slash at the end of the update host, since otherwise
there'll be two of them.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | src/main.cpp | 4 |
2 files changed, 9 insertions, 0 deletions
@@ -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("://"); |