Re: [RFC PATCH 5/6] msvc: opendir: handle paths ending with a slash
- From
Jonathan Nieder <jrnieder@gmail.com>
- Date
- Nov 23, 2010, 17:43 UTC
- Message-ID
- <20101123174351.GD12113@burratino>
- In-Reply-To
- <1290533444-3404-6-git-send-email-kusmabite@gmail.com>
Erik Faye-Lund wrote:
Show 8 quoted lines
> --- 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--;
I assume len can't be 0?