aboutsummaryrefslogtreecommitdiffstats
path: root/subsurface-core
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2016-02-10 17:57:01 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2016-02-10 21:03:52 -0800
commit055ec05e0f364e6d4aba86033ee87ab30df2d086 (patch)
tree52d8e22aee77ff49b91ca40412a83105a5eb24dc /subsurface-core
parente26e50f2e4a9ce78e345d06345d437d67aaa2451 (diff)
downloadsubsurface-055ec05e0f364e6d4aba86033ee87ab30df2d086.tar.gz
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 <dirk@hohndel.org>
Diffstat (limited to 'subsurface-core')
-rw-r--r--subsurface-core/file.c4
1 files changed, 2 insertions, 2 deletions
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 */