mirror of
https://github.com/git/git
synced 2024-10-05 16:19:28 +00:00
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:
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 */
|
||||||
|
|
Loading…
Reference in a new issue