From d6ccedddd2f76d69b05ecfa45a93cde8682776e6 Mon Sep 17 00:00:00 2001 From: Russell Belfer Date: Wed, 14 Dec 2011 10:52:28 -0800 Subject: [PATCH] Check error on path manipulations. This commit fixes #511. --- src/status.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/status.c b/src/status.c index 05e07be0a..64be6ce29 100644 --- a/src/status.c +++ b/src/status.c @@ -370,6 +370,7 @@ static int dirent_cb(void *state, git_buf *a) if (git_tree_entry_type(m) == GIT_OBJ_TREE) git_path_to_dir(&st->head_tree_relative_path); + error = git_buf_lasterror(&st->head_tree_relative_path); if (error < GIT_SUCCESS) return git__rethrow(error, "An error occured while determining the status of '%s'", a->ptr);