fix: failure to load doom libs on 27.x
Emacs 27.x does not collapse consecutive slashes in a file path when
trying to load them, and instead discards everything before it and
treats the rest as an absolute path, e.g. "~/some//path/foo/" ->
"/path/foo". This is not the case in 28.1, but Doom's backport of
file-name-concat did not take this into account, so it's been modified
to trim trailing slashes.
Fix: #6766
Amend: 433c9e344d
This commit is contained in:
parent
eb80d461df
commit
3505e666a8
1 changed files with 6 additions and 5 deletions
|
@ -857,11 +857,12 @@ with a slash -- if they don't end with a slash, a slash will be
|
|||
inserted before contatenating."
|
||||
(mapconcat
|
||||
#'identity
|
||||
(save-match-data
|
||||
(cl-loop for str in (cons directory components)
|
||||
when (and str (/= 0 (length str))
|
||||
(string-match "\\(.+\\)/?" str))
|
||||
collect (match-string 1 str)))
|
||||
(cl-loop for str in (cons directory components)
|
||||
if (and str (/= 0 (length str))
|
||||
(if (string-suffix-p "/" str)
|
||||
(substring str 0 -1)
|
||||
str))
|
||||
collect it)
|
||||
"/"))
|
||||
|
||||
;; Introduced in Emacs 28.1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue