vcs-svn: Check for errors from open()
test-svn-fe segfaults when passed a bogus path. Simplify debugging by exiting with a meaningful error message instead. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
1f05d07c45
commit
5c28a8b054
@ -290,14 +290,16 @@ void svndump_read(const char *url)
|
||||
handle_revision();
|
||||
}
|
||||
|
||||
void svndump_init(const char *filename)
|
||||
int svndump_init(const char *filename)
|
||||
{
|
||||
buffer_init(filename);
|
||||
if (buffer_init(filename))
|
||||
return error("cannot open %s: %s", filename, strerror(errno));
|
||||
repo_init();
|
||||
reset_dump_ctx(~0);
|
||||
reset_rev_ctx(0);
|
||||
reset_node_ctx(NULL);
|
||||
init_keys();
|
||||
return 0;
|
||||
}
|
||||
|
||||
void svndump_deinit(void)
|
||||
|
Reference in New Issue
Block a user