Fix a remove_empty_dir_recursive problem.
Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:

committed by
Junio C Hamano

parent
2eaf22242f
commit
28bed6ea21
2
refs.c
2
refs.c
@ -498,7 +498,7 @@ static int remove_empty_dir_recursive(char *path, int len)
|
|||||||
strcpy(path + len, e->d_name) &&
|
strcpy(path + len, e->d_name) &&
|
||||||
!lstat(path, &st) &&
|
!lstat(path, &st) &&
|
||||||
S_ISDIR(st.st_mode) &&
|
S_ISDIR(st.st_mode) &&
|
||||||
remove_empty_dir_recursive(path, len + namlen))
|
!remove_empty_dir_recursive(path, len + namlen))
|
||||||
continue; /* happy */
|
continue; /* happy */
|
||||||
|
|
||||||
/* path too long, stat fails, or non-directory still exists */
|
/* path too long, stat fails, or non-directory still exists */
|
||||||
|
Reference in New Issue
Block a user