Downcase host names in ansi-osc.el to match URL parsing behavior

* lisp/ansi-osc.el (ansi-osc-directory-tracker): Compare
with 'system-name' case-insensitively.  (Bug#68632)

Copyright-paperwork-exempt: yes
This commit is contained in:
Brad Howes 2024-01-21 10:07:24 +01:00 committed by Eli Zaretskii
parent 756daa93b3
commit fc70eced27

View file

@ -121,7 +121,8 @@ and `shell-dirtrack-mode'."
(let ((url (url-generic-parse-url text)))
(when (and (string= (url-type url) "file")
(or (null (url-host url))
(string= (url-host url) (system-name))))
;; Use `downcase' to match `url-generic-parse-url' behavior
(string= (url-host url) (downcase (system-name)))))
(ignore-errors
(cd-absolute (url-unhex-string (url-filename url)))))))