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>
This commit is contained in:
Dirk Hohndel 2016-02-10 17:57:01 -08:00
parent e26e50f2e4
commit 055ec05e0f

View file

@ -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 */