emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

feature/native-comp 3ae309b: * Fix eln file hasing for symlink paths (bu


From: Andrea Corallo
Subject: feature/native-comp 3ae309b: * Fix eln file hasing for symlink paths (bug#44701)
Date: Wed, 18 Nov 2020 12:52:13 -0500 (EST)

branch: feature/native-comp
commit 3ae309bd59c608b4262209e225b963a8f73450e6
Author: Andrea Corallo <akrl@sdf.org>
Commit: Andrea Corallo <akrl@sdf.org>

    * Fix eln file hasing for symlink paths (bug#44701)
    
        * src/comp.c (Fcomp_el_to_eln_filename): Call `file-truename'
        in place of `expand-file-name' when available.
---
 src/comp.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/src/comp.c b/src/comp.c
index 5b0f58b..292f0e7 100644
--- a/src/comp.c
+++ b/src/comp.c
@@ -4037,7 +4037,15 @@ If BASE-DIR is nil use the first entry in 
`comp-eln-load-path'.  */)
 {
   CHECK_STRING (filename);
 
-  filename = Fexpand_file_name (filename, Qnil);
+  /* Use `file-truename' or fall back to `expand-file-name' when the
+     first is not available (bug#44701).
+
+     `file-truename' is not available only for a short phases of the
+     bootstrap before file.el is loaded, given we do not symlink
+     inside the build directory this should work.  */
+  filename = NILP (Ffboundp (intern_c_string ("file-truename")))
+    ? Fexpand_file_name (filename, Qnil)
+    : CALL1I (file-truename, filename);
 
   if (NILP (Ffile_exists_p (filename)))
     xsignal1 (Qfile_missing, filename);



reply via email to

[Prev in Thread] Current Thread [Next in Thread]