Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
msvc: opendir: handle paths ending with a slash
author
Erik Faye-Lund
<kusmabite@gmail.com>
Tue, 23 Nov 2010 18:38:28 +0000
(19:38 +0100)
committer
Junio C Hamano
<gitster@pobox.com>
Wed, 24 Nov 2010 00:06:47 +0000
(16:06 -0800)
Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
compat/msvc.c
patch
|
blob
|
history
raw
|
patch
| inline |
side by side
(parent:
9585ed5
)
diff --git
a/compat/msvc.c
b/compat/msvc.c
index 199eb220f42032c1b50dd226dbea084cc10ccd38..fdbfb70a627ccea462e683a56616f2613522daae 100644
(file)
--- a/
compat/msvc.c
+++ b/
compat/msvc.c
@@
-23,6
+23,8
@@
DIR *opendir(const char *name)
/* check that the pattern won't be too long for FindFirstFileA */
len = strlen(name);
+ if (is_dir_sep(name[len - 1]))
+ len--;
if (len + 2 >= MAX_PATH) {
errno = ENAMETOOLONG;
return NULL;