aboutsummaryrefslogtreecommitdiffstats
path: root/core/qthelper.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/qthelper.cpp')
-rw-r--r--core/qthelper.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/core/qthelper.cpp b/core/qthelper.cpp
index 6678cc87f..185e46bbc 100644
--- a/core/qthelper.cpp
+++ b/core/qthelper.cpp
@@ -22,6 +22,7 @@
#include "trip.h"
#include "imagedownloader.h"
#include "xmlparams.h"
+#include "core/git-access.h" // for CLOUD_HOST definitions
#include <QFile>
#include <QRegExp>
#include <QDir>
@@ -1455,6 +1456,15 @@ extern "C" char *cloud_url()
return copy_qstring(filename);
}
+extern "C" const char *normalize_cloud_name(const char *remote_in)
+{
+ // replace ssrf-cloud-XX.subsurface... names with cloud.subsurface... names
+ // that trailing '/' is to match old code
+ QString ri(remote_in);
+ ri.replace(QRegularExpression(CLOUD_HOST_PATTERN), CLOUD_HOST_GENERIC "/");
+ return strdup(ri.toUtf8().constData());
+}
+
extern "C" bool getProxyString(char **buffer)
{
if (prefs.proxy_type == QNetworkProxy::HttpProxy) {