Mercurial > emacs
changeset 106949:86ae2a69cf52
Fix bug #5303 in `load' on MS-Windows, whereby load-file would fail
for files like C:/the-file.el in root directory of any drive.
lread.c (Fload): Don't treat files without .elc extension as
byte-compiled if they are ``magic'', i.e. `openp' returned -2 for
them.
author | Eli Zaretskii <eliz@gnu.org> |
---|---|
date | Fri, 22 Jan 2010 10:44:50 +0200 |
parents | 719b13c3b762 |
children | ddd257e3f816 |
files | src/ChangeLog src/lread.c |
diffstat | 2 files changed, 7 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog Thu Jan 21 21:45:01 2010 +0000 +++ b/src/ChangeLog Fri Jan 22 10:44:50 2010 +0200 @@ -1,3 +1,9 @@ +2010-01-22 Eli Zaretskii <eliz@gnu.org> + + * lread.c (Fload): Don't treat files without .elc extension as + byte-compiled if they are ``magic'', i.e. `openp' returned -2 for + them. (bug#5303) + 2010-01-20 Kenichi Handa <handa@m17n.org> * coding.c (consume_chars): If ! multibyte and the encoder is ccl,
--- a/src/lread.c Thu Jan 21 21:45:01 2010 +0000 +++ b/src/lread.c Fri Jan 22 10:44:50 2010 +0200 @@ -1155,7 +1155,7 @@ if (!bcmp (SDATA (found) + SBYTES (found) - 4, ".elc", 4) - || (version = safe_to_load_p (fd)) > 0) + || (fd >= 0 && (version = safe_to_load_p (fd)) > 0)) /* Load .elc files directly, but not when they are remote and have no handler! */ {