From f6a20b2ccac82ce66e6d6f0cfcf29cfc840ab1e7 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Thu, 11 Mar 2004 21:10:21 +0000 Subject: [PATCH] (ldap-search-internal): Handle file URLs with drive letters on DOS/Windows. --- lisp/ChangeLog | 5 +++++ lisp/net/ldap.el | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 86b8eb8bb69..141b28ba9e6 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2004-03-11 Jason Rumney + + * net/ldap.el (ldap-search-internal): Handle file URLs with drive + letters on DOS/Windows. + 2004-03-11 Stefan Monnier * server.el (server-name): New var. diff --git a/lisp/net/ldap.el b/lisp/net/ldap.el index d1a580f9c54..93802d5744a 100644 --- a/lisp/net/ldap.el +++ b/lisp/net/ldap.el @@ -582,6 +582,11 @@ an alist of attribute/value pairs." (while (looking-at "^\\(\\w*\\)[=:\t ]+\\(<[\t ]*file://\\)?\\(.*\\)$") (setq name (match-string 1) value (match-string 3)) + ;; Need to handle file:///D:/... as generated by OpenLDAP + ;; on DOS/Windows as local files. + (if (and (memq system-type '(windows-nt ms-dos)) + (eq (string-match "/\\(.:.*\\)$" value) 0)) + (setq value (match-string 1 value))) ;; Do not try to open non-existent files (if (equal value "") (setq value " ") -- 2.39.5