mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-31 18:23:23 +00:00
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:
parent
e26e50f2e4
commit
055ec05e0f
1 changed files with 2 additions and 2 deletions
|
@ -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 */
|
||||
|
|
Loading…
Add table
Reference in a new issue