From 055ec05e0f364e6d4aba86033ee87ab30df2d086 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Wed, 10 Feb 2016 17:57:01 -0800 Subject: Don't just keep going when opening a git URL fails Once we identified that our filename is actually a git designator (as seen by the fact that it ends in a [branchname] surrounded by '[]'), we shouldn't try to open that filename in order to try other ways of parsing the data; instead we should just return an error to the caller. This way the calling code can tell that an error occured. Signed-off-by: Dirk Hohndel --- subsurface-core/file.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'subsurface-core') diff --git a/subsurface-core/file.c b/subsurface-core/file.c index 644956dbd..3f6dd6dbb 100644 --- a/subsurface-core/file.c +++ b/subsurface-core/file.c @@ -486,8 +486,8 @@ int parse_file(const char *filename) return 0; } } - if (git && !git_load_dives(git, branch)) - return 0; + if (git) + 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 */ -- cgit v1.2.3-70-g09d2