]> git.eshelyaron.com Git - emacs.git/commitdiff
* Canonicalize filenames on Windows before hashing (bug#46256)
authorAndrea Corallo <akrl@sdf.org>
Fri, 26 Feb 2021 20:27:02 +0000 (21:27 +0100)
committerAndrea Corallo <akrl@sdf.org>
Fri, 26 Feb 2021 20:28:59 +0000 (21:28 +0100)
* src/comp.c (Fcomp_el_to_eln_filename): On Windowns
canonicalize filenames before hashing.

src/comp.c

index a8b8ef95fa14d14bc4a303b0ae6bd6bec0e6be4e..1a89e4e62a442711a0d2335c08b949118c62b143 100644 (file)
@@ -3983,6 +3983,10 @@ If BASE-DIR is nil use the first entry in `comp-eln-load-path'.  */)
   if (NILP (Ffile_exists_p (filename)))
     xsignal1 (Qfile_missing, filename);
 
+#ifdef WINDOWSNT
+  filename = Fw32_long_file_name (filename);
+#endif
+
   Lisp_Object content_hash = comp_hash_source_file (filename);
 
   if (suffix_p (filename, ".gz"))
@@ -4014,8 +4018,11 @@ If BASE-DIR is nil use the first entry in `comp-eln-load-path'.  */)
       Lisp_Object sys_re =
        concat2 (build_string ("\\`[[:ascii:]]+"),
                 Fregexp_quote (build_string ("/" PATH_REL_LOADSEARCH "/")));
-      loadsearch_re_list =
-       list2 (sys_re, Fregexp_quote (build_string (PATH_DUMPLOADSEARCH "/")));
+      Lisp_Object dump_load_search = build_string (PATH_DUMPLOADSEARCH "/");
+#ifdef WINDOWSNT
+      dump_load_search = Fw32_long_file_name (dump_load_search);
+#endif
+      loadsearch_re_list = list2 (sys_re, Fregexp_quote (dump_load_search));
     }
 
   Lisp_Object lds_re_tail = loadsearch_re_list;