From c8db8fbd71727b601172225f81c6198dc96d57db Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Thu, 17 Jul 2008 23:08:17 +0000 Subject: Remove possible trailing slash at the end of the update host, since otherwise there'll be two of them. --- src/main.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') 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("://"); -- cgit v1.2.3-70-g09d2