]> git.proxmox.com Git - libgit2.git/commitdiff
Check error on path manipulations.
authorRussell Belfer <arrbee@arrbee.com>
Wed, 14 Dec 2011 18:52:28 +0000 (10:52 -0800)
committerRussell Belfer <arrbee@arrbee.com>
Wed, 14 Dec 2011 22:31:06 +0000 (14:31 -0800)
This commit fixes #511.

src/status.c

index 05e07be0a53c340a13812944ff2befdcd4737d4d..64be6ce29ebb6c2f63b2eaf82720137fcf1c4887 100644 (file)
@@ -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);