aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii2019-09-18 21:46:11 +0300
committerEli Zaretskii2019-09-18 21:46:11 +0300
commit617f4f31a09f974b0c9cbac903643ee553e5eaa8 (patch)
tree1c25dc35441206f6b4da8168ead9c74f7d7d7b51 /src
parent61c2183a440c94ab797696d0f0c76a7dc4007eeb (diff)
downloademacs-617f4f31a09f974b0c9cbac903643ee553e5eaa8.tar.gz
emacs-617f4f31a09f974b0c9cbac903643ee553e5eaa8.zip
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.
Diffstat (limited to 'src')
-rw-r--r--src/lread.c7
1 files 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. */)
1343 /* openp already checked for newness, no point doing it again. 1343 /* openp already checked for newness, no point doing it again.
1344 FIXME would be nice to get a message when openp 1344 FIXME would be nice to get a message when openp
1345 ignores suffix order due to load_prefer_newer. */ 1345 ignores suffix order due to load_prefer_newer. */
1346 Lisp_Object notfound = found;
1346 if (!load_prefer_newer && is_elc) 1347 if (!load_prefer_newer && is_elc)
1347 { 1348 {
1348 result = stat (SSDATA (efound), &s1); 1349 result = stat (SSDATA (efound), &s1);
@@ -1354,11 +1355,11 @@ Return t if the file exists and loads successfully. */)
1354 err = errno; 1355 err = errno;
1355 SSET (efound, SBYTES (efound) - 1, 'c'); 1356 SSET (efound, SBYTES (efound) - 1, 'c');
1356 if (result != 0) 1357 if (result != 0)
1357 found = Fsubstring (found, make_fixnum (0), 1358 notfound = Fsubstring (found, make_fixnum (0),
1358 make_fixnum (-1)); 1359 make_fixnum (-1));
1359 } 1360 }
1360 if (result != 0) 1361 if (result != 0)
1361 file_test_errno (found, err); 1362 file_test_errno (notfound, err);
1362 else if (timespec_cmp (get_stat_mtime (&s1), 1363 else if (timespec_cmp (get_stat_mtime (&s1),
1363 get_stat_mtime (&s2)) 1364 get_stat_mtime (&s2))
1364 < 0) 1365 < 0)