aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Rumney <[email protected]>2004-03-11 21:10:21 +0000
committerJason Rumney <[email protected]>2004-03-11 21:10:21 +0000
commitf6a20b2ccac82ce66e6d6f0cfcf29cfc840ab1e7 (patch)
treeede1a92db55dab36524ecfebbe432e442e104af1
parent61042632e3f9cc5e88e061f643c7f070f6226dda (diff)
(ldap-search-internal): Handle file URLs with drive
letters on DOS/Windows.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/net/ldap.el5
2 files changed, 10 insertions, 0 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 86b8eb8bb6..141b28ba9e 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2004-03-11 Jason Rumney <[email protected]>
+
+ * net/ldap.el (ldap-search-internal): Handle file URLs with drive
+ letters on DOS/Windows.
+
2004-03-11 Stefan Monnier <[email protected]>
* server.el (server-name): New var.
diff --git a/lisp/net/ldap.el b/lisp/net/ldap.el
index d1a580f9c5..93802d5744 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 " ")