aboutsummaryrefslogtreecommitdiff
path: root/vcs-svn/svndump.c
diff options
context:
space:
mode:
authorJonathan Nieder <jrnieder@gmail.com>2010-11-19 18:46:06 -0600
committerJunio C Hamano <gitster@pobox.com>2010-11-24 14:51:42 -0800
commit5c28a8b054cb69a37638b0261fc370422c8fab58 (patch)
tree111356892e3a73a6439fb0506971d178096f6277 /vcs-svn/svndump.c
parent1f05d07c456e23c0827efbbb3e738afc9f3152e7 (diff)
downloadgit-5c28a8b054cb69a37638b0261fc370422c8fab58.tar.gz
git-5c28a8b054cb69a37638b0261fc370422c8fab58.tar.xz
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>
Diffstat (limited to 'vcs-svn/svndump.c')
-rw-r--r--vcs-svn/svndump.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/vcs-svn/svndump.c b/vcs-svn/svndump.c
index 6b64c1b85..db1185122 100644
--- a/vcs-svn/svndump.c
+++ b/vcs-svn/svndump.c
@@ -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)