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>
Karsten Blees committed
Jan 7, 2011 at 17:43 UTC
fa9abe95bec0e12322baae3511678ccfeb97eebc
1 file changed
+1
-1
compat/win32/dirent.h
+1
-1
@@ -9,8 +9,8 @@ typedef struct DIR DIR;
9
#define DT_LNK 3
10
11
struct dirent {
12
- char d_name[FILENAME_MAX]; /* File name. */
12
unsigned char d_type; /* file type to prevent lstat after readdir */
13
+ char d_name[MAX_PATH]; /* file name */
14
};
15
16
DIR *opendir(const char *dirname);