Show More
@@ -203,14 +203,15 b' static PyObject *_listdir(char *path, in' | |||
|
203 | 203 | PyErr_NoMemory(); |
|
204 | 204 | goto error_nomem; |
|
205 | 205 | } |
|
206 |
|
|
|
206 | memcpy(pattern, path, plen); | |
|
207 | 207 | |
|
208 | 208 | if (plen > 0) { |
|
209 | 209 | char c = path[plen-1]; |
|
210 | 210 | if (c != ':' && c != '/' && c != '\\') |
|
211 | 211 | pattern[plen++] = '\\'; |
|
212 | 212 | } |
|
213 | strcpy(pattern + plen, "*"); | |
|
213 | pattern[plen++] = '*'; | |
|
214 | pattern[plen] = '\0'; | |
|
214 | 215 | |
|
215 | 216 | fh = FindFirstFileA(pattern, &fd); |
|
216 | 217 | if (fh == INVALID_HANDLE_VALUE) { |
General Comments 0
You need to be logged in to leave comments.
Login now