From: Erik Faye-Lund Date: Tue, 23 Nov 2010 18:38:28 GMT Subject: [PATCH v2 5/6] msvc: opendir: handle paths ending with a slash Message-ID: <1290537509-360-6-git-send-email-kusmabite@gmail.com> In-Reply-To: <1290537509-360-1-git-send-email-kusmabite@gmail.com> Signed-off-by: Erik Faye-Lund --- compat/msvc.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/compat/msvc.c b/compat/msvc.c index 199eb22..fdbfb70 100644 --- 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; -- 1.7.3.2.493.gc8738