diff options
author | Steve Dower <steve.dower@microsoft.com> | 2017-02-04 23:19:29 (GMT) |
---|---|---|
committer | Steve Dower <steve.dower@microsoft.com> | 2017-02-04 23:19:29 (GMT) |
commit | 5f9193a6edf1864a243def36ec4d1277054236c6 (patch) | |
tree | c88222a6702078a2590a2b0d4ebd873c341ebd55 /PC/getpathp.c | |
parent | 722e3e2705e1f7dbbbc2ad58e2957f9fb759ad76 (diff) | |
download | cpython-5f9193a6edf1864a243def36ec4d1277054236c6.zip cpython-5f9193a6edf1864a243def36ec4d1277054236c6.tar.gz cpython-5f9193a6edf1864a243def36ec4d1277054236c6.tar.bz2 |
Issue #29326: Ignores blank lines in ._pth files (Patch by Alexey Izbyshev)
Diffstat (limited to 'PC/getpathp.c')
-rw-r--r-- | PC/getpathp.c | 2 |
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') { |