diff options
author | Steve Dower <steve.dower@microsoft.com> | 2017-02-04 15:19:46 -0800 |
---|---|---|
committer | Steve Dower <steve.dower@microsoft.com> | 2017-02-04 15:19:46 -0800 |
commit | 06c5773ee2e8365a84a4ed363d802c7dfa5c7dd8 (patch) | |
tree | d984cb394df1c10b3df0400d484ce1b6e3a70686 /PC/getpathp.c | |
parent | 7fbf6af205939dee36bd679058140620a9efefe2 (diff) | |
parent | d1d8706cdb77e2adbbb4110338dcda0e1811f892 (diff) | |
download | cpython-06c5773ee2e8365a84a4ed363d802c7dfa5c7dd8.tar.gz |
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 0b0ae49739..1eeebfe9c1 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') { |