Issue #29326: Ignores blank lines in ._pth files (Patch by Alexey Izbyshev)

This commit is contained in:
Steve Dower 2017-02-04 15:19:46 -08:00
commit 824c6fdfaa
4 changed files with 31 additions and 14 deletions

View file

@ -560,7 +560,7 @@ read_pth_file(const wchar_t *path, wchar_t *prefix, int *isolated, int *nosite)
char *p = fgets(line, MAXPATHLEN + 1, sp_file);
if (!p)
break;
if (*p == '\0' || *p == '#')
if (*p == '\0' || *p == '\r' || *p == '\n' || *p == '#')
continue;
while (*++p) {
if (*p == '\r' || *p == '\n') {