summaryrefslogtreecommitdiff
path: root/dir.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2009-05-16 23:08:49 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2009-05-16 23:08:49 -0700
commit55524fcf9d6676ca3840227092bf3a14ba404615 (patch)
tree82e8251a255c5f962f1d5dce75fd14c97cbc3ba9 /dir.c
parentMerge branch 'maint' (diff)
parentcompletion: add missing options to show-branch and show (diff)
downloadtgif-55524fcf9d6676ca3840227092bf3a14ba404615.tar.xz
Merge branch 'maint'
* maint: completion: add missing options to show-branch and show dir.c: clean up handling of 'path' parameter in read_directory_recursive() Fix type-punning issues
Diffstat (limited to 'dir.c')
-rw-r--r--dir.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/dir.c b/dir.c
index 6aae09a22e..0e6b752cd5 100644
--- a/dir.c
+++ b/dir.c
@@ -576,7 +576,7 @@ static int get_dtype(struct dirent *de, const char *path)
*/
static int read_directory_recursive(struct dir_struct *dir, const char *path, const char *base, int baselen, int check_only, const struct path_simplify *simplify)
{
- DIR *fdir = opendir(path);
+ DIR *fdir = opendir(*path ? path : ".");
int contents = 0;
if (fdir) {