diff options
author | Karsten Blees <blees@dcon.de> | 2011-01-07 17:43:14 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-06-09 15:10:53 -0700 |
commit | fa9abe95bec0e12322baae3511678ccfeb97eebc (patch) | |
tree | b188e70c2825587f8248925f04db5fce7add15ca /compat | |
parent | b0601e6564061aa21699ee0a523e969c228cb1b4 (diff) | |
download | git-fa9abe95bec0e12322baae3511678ccfeb97eebc.tar.gz |
Win32 dirent: change FILENAME_MAX to MAX_PATH
FILENAME_MAX and MAX_PATH are both 260 on Windows, however, MAX_PATH is
used throughout the other Win32 code in Git, and also defines the length
of file name buffers in the Win32 API (e.g. WIN32_FIND_DATA.cFileName,
from which we're copying the dirent data).
Signed-off-by: Karsten Blees <blees@dcon.de>
Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
Signed-off-by: Stepan Kasal <kasal@ucw.cz>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'compat')
-rw-r--r-- | compat/win32/dirent.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compat/win32/dirent.h b/compat/win32/dirent.h index 7f4e6c71d9..8838cd61fc 100644 --- a/compat/win32/dirent.h +++ b/compat/win32/dirent.h @@ -9,8 +9,8 @@ typedef struct DIR DIR; #define DT_LNK 3 struct dirent { - char d_name[FILENAME_MAX]; /* File name. */ unsigned char d_type; /* file type to prevent lstat after readdir */ + char d_name[MAX_PATH]; /* file name */ }; DIR *opendir(const char *dirname); |