summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lisp/complete.el6
1 files changed, 5 insertions, 1 deletions
diff --git a/lisp/complete.el b/lisp/complete.el
index 6b5cc3d5900..c755f725c57 100644
--- a/lisp/complete.el
+++ b/lisp/complete.el
@@ -446,7 +446,11 @@ of `minibuffer-completion-table' and the minibuffer contents.")
(setq basestr (substring str incname)
dirname (substring str 0 incname))
(setq basestr (file-name-nondirectory str)
- dirname (file-name-directory str)))
+ dirname (file-name-directory str))
+ ;; Make sure str is consistent with its directory and basename
+ ;; parts. This is important on DOZe'NT systems when str only
+ ;; includes a drive letter, like in "d:".
+ (setq str (concat dirname basestr)))
(setq basestr str))
;; Convert search pattern to a standard regular expression