diff src/lread.c @ 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 1d1d5d9bd884
children 84b961690802 de58fd0baac5
line wrap: on
line diff
--- 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!  */
     {