summaryrefslogtreecommitdiffstats
path: root/PC
diff options
context:
space:
mode:
authorSteve Dower <steve.dower@microsoft.com>2017-02-04 23:19:46 (GMT)
committerSteve Dower <steve.dower@microsoft.com>2017-02-04 23:19:46 (GMT)
commit824c6fdfaa79f601fa50b99ff1d20e565cdc4120 (patch)
treed54f789a3ba9b346041af8ebd8de5e9e6a48a837 /PC
parent43fec9b419512d67e94b26f7da24c8392e835517 (diff)
parent5f9193a6edf1864a243def36ec4d1277054236c6 (diff)
downloadcpython-824c6fdfaa79f601fa50b99ff1d20e565cdc4120.zip
cpython-824c6fdfaa79f601fa50b99ff1d20e565cdc4120.tar.gz
cpython-824c6fdfaa79f601fa50b99ff1d20e565cdc4120.tar.bz2
Issue #29326: Ignores blank lines in ._pth files (Patch by Alexey Izbyshev)
Diffstat (limited to 'PC')
-rw-r--r--PC/getpathp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/PC/getpathp.c b/PC/getpathp.c
index 0b0ae49..1eeebfe 100644
--- a/PC/getpathp.c
+++ b/PC/getpathp.c
@@ -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') {