summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschu <schu-github@schulog.org>2011-09-17 17:28:39 +0200
committerschu <schu-github@schulog.org>2011-09-17 17:28:39 +0200
commit855f06606dce01cdeab8f74a99e55a7d13ba784e (patch)
treedd449e6cc7981f4f83ff7f3cbed82fa605924c5c
parentef37489041ff7bbab5a10bf54fe9b01ddacef75e (diff)
downloadlibgit2-855f06606dce01cdeab8f74a99e55a7d13ba784e.tar.gz
status.c: add missing check for error
dirent_cb() didn't check the return value of determine_status(). Signed-off-by: schu <schu-github@schulog.org>
-rw-r--r--src/status.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/status.c b/src/status.c
index b93ea7096..18e08fb01 100644
--- a/src/status.c
+++ b/src/status.c
@@ -411,7 +411,8 @@ static int dirent_cb(void *state, char *a)
pa = ((cmpma >= 0) && (cmpai <= 0)) ? a_name : NULL;
pi = ((cmpmi >= 0) && (cmpai >= 0)) ? i_name : NULL;
- error = determine_status(st, pm != NULL, pi != NULL, pa != NULL, m, entry, a, status_path(pm, pi, pa), path_type);
+ if((error = determine_status(st, pm != NULL, pi != NULL, pa != NULL, m, entry, a, status_path(pm, pi, pa), path_type)) < GIT_SUCCESS)
+ return git__rethrow(error, "An error occured while determining the status of '%s'", a);
if (pa != NULL)
return GIT_SUCCESS;