mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Issue #29326: Ignores blank lines in ._pth files (Patch by Alexey Izbyshev)
This commit is contained in:
commit
824c6fdfaa
4 changed files with 31 additions and 14 deletions
|
@ -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') {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue