]> git.eshelyaron.com Git - emacs.git/commitdiff
Downcase host names in ansi-osc.el to match URL parsing behavior
authorBrad Howes <bradhowes@mac.com>
Sun, 21 Jan 2024 09:07:24 +0000 (10:07 +0100)
committerEshel Yaron <me@eshelyaron.com>
Wed, 31 Jan 2024 20:08:12 +0000 (21:08 +0100)
* lisp/ansi-osc.el (ansi-osc-directory-tracker): Compare
with 'system-name' case-insensitively.  (Bug#68632)

Copyright-paperwork-exempt: yes
(cherry picked from commit fc70eced27832bde0f3702a1f9033d5b81a8d61d)

lisp/ansi-osc.el

index 7e686193f6984c978d4a8b246c56744e44d99776..8dbaeb45132537a7265a7ae2bd604502a2419bc8 100644 (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)))))))