summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/file.c5
-rw-r--r--core/qthelper.cpp10
-rw-r--r--core/qthelperfromc.h1
3 files changed, 2 insertions, 14 deletions
diff --git a/core/file.c b/core/file.c
index 874a4e2c3..e818c9e21 100644
--- a/core/file.c
+++ b/core/file.c
@@ -497,9 +497,8 @@ int parse_file(const char *filename)
return git_load_dives(git, branch);
if ((ret = readfile(filename, &mem)) < 0) {
- /* we don't want to display an error if this was the default file or the cloud storage */
- if ((prefs.default_filename && !strcmp(filename, prefs.default_filename)) ||
- isCloudUrl(filename))
+ /* we don't want to display an error if this was the default file */
+ if (same_string(filename, prefs.default_filename))
return 0;
return report_error(translate("gettextFromC", "Failed to read '%s'"), filename);
diff --git a/core/qthelper.cpp b/core/qthelper.cpp
index 341819a96..d26d2eb4d 100644
--- a/core/qthelper.cpp
+++ b/core/qthelper.cpp
@@ -1449,16 +1449,6 @@ extern "C" char *cloud_url()
return strdup(filename.toUtf8().data());
}
-extern "C" bool isCloudUrl(const char *filename)
-{
- QString email = QString(prefs.cloud_storage_email);
- email.replace(QRegularExpression("[^a-zA-Z0-9@._+-]"), "");
- if (!email.isEmpty() &&
- QString(QString(prefs.cloud_git_url) + "/%1[%1]").arg(email) == filename)
- return true;
- return false;
-}
-
extern "C" bool getProxyString(char **buffer)
{
if (prefs.proxy_type == QNetworkProxy::HttpProxy) {
diff --git a/core/qthelperfromc.h b/core/qthelperfromc.h
index fb308c5dd..631596110 100644
--- a/core/qthelperfromc.h
+++ b/core/qthelperfromc.h
@@ -5,7 +5,6 @@
bool getProxyString(char **buffer);
bool canReachCloudServer();
void updateWindowTitle();
-bool isCloudUrl(const char *filename);
void subsurface_mkdir(const char *dir);
char *get_file_name(const char *fileName);
void copy_image_and_overwrite(const char *cfileName, const char *path, const char *cnewName);