From 617f4f31a09f974b0c9cbac903643ee553e5eaa8 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Wed, 18 Sep 2019 21:46:11 +0300 Subject: [PATCH] Fix loading .elc files on MS-Windows * src/lread.c (Fload): Don't clobber 'found' if the .el file was not found, as it is used by WINDOWSNT later on. --- src/lread.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/lread.c b/src/lread.c index ab0fab47a98..99e0ce30ba6 100644 --- a/src/lread.c +++ b/src/lread.c @@ -1343,6 +1343,7 @@ Return t if the file exists and loads successfully. */) /* openp already checked for newness, no point doing it again. FIXME would be nice to get a message when openp ignores suffix order due to load_prefer_newer. */ + Lisp_Object notfound = found; if (!load_prefer_newer && is_elc) { result = stat (SSDATA (efound), &s1); @@ -1354,11 +1355,11 @@ Return t if the file exists and loads successfully. */) err = errno; SSET (efound, SBYTES (efound) - 1, 'c'); if (result != 0) - found = Fsubstring (found, make_fixnum (0), - make_fixnum (-1)); + notfound = Fsubstring (found, make_fixnum (0), + make_fixnum (-1)); } if (result != 0) - file_test_errno (found, err); + file_test_errno (notfound, err); else if (timespec_cmp (get_stat_mtime (&s1), get_stat_mtime (&s2)) < 0) -- 2.39.5