Thread (18 messages) flat view 18 messages, 2 authors, 2016-06-15

Re: [RFC PATCH 5/6] msvc: opendir: handle paths ending with a slash

From: Erik Faye-Lund <hidden>
Date: 2016-06-15 22:50:05

On Tue, Nov 23, 2010 at 6:43 PM, Jonathan Nieder [off-list ref] wrote:
Erik Faye-Lund wrote:
quoted
--- 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?
Nope, in that case GetFileAttributesA would have errore out.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help