diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2015-06-13 09:08:39 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-06-13 09:14:48 -0700 |
commit | df255e257316c277c51fb5fab5ca5168f0cae631 (patch) | |
tree | f1b191a4d9e651ef507c6a1af775ed5046701f7b /file.c | |
parent | abde615c1c3f64bed1d492a1f5f878fd890b111c (diff) | |
download | subsurface-df255e257316c277c51fb5fab5ca5168f0cae631.tar.gz |
Don't show an error if you fail to open the cloud storage
The lower level functions will already report that things didn't connect
successfully, no reason to repeat it here (which then exposes the git
URL).
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'file.c')
-rw-r--r-- | file.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -11,6 +11,7 @@ #include "dive.h" #include "file.h" #include "git-access.h" +#include "qthelperfromc.h" /* For SAMPLE_* */ #include <libdivecomputer/parser.h> @@ -431,8 +432,9 @@ int parse_file(const char *filename) return 0; if (readfile(filename, &mem) < 0) { - /* we don't want to display an error if this was the default file */ - if (prefs.default_filename && !strcmp(filename, prefs.default_filename)) + /* 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)) return 0; return report_error(translate("gettextFromC", "Failed to read '%s'"), filename); |