summaryrefslogtreecommitdiff
path: root/src/main.cpp
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 /src/main.cpp
parentea37ffc6d73bb0de686c29f8e8c6769f2a704ec5 (diff)
downloadmana-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.
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp4
1 files changed, 4 insertions, 0 deletions
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("://");