# HG changeset patch # User Eli Zaretskii # Date 1264149890 -7200 # Node ID 86ae2a69cf520bf09d824d2eb7b2835dddd6352b # Parent 719b13c3b762f097bf570bbc5d8daa2f724b83b5 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. diff -r 719b13c3b762 -r 86ae2a69cf52 src/ChangeLog --- 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 + + * 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 * coding.c (consume_chars): If ! multibyte and the encoder is ccl, diff -r 719b13c3b762 -r 86ae2a69cf52 src/lread.c --- 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! */ {