diff options
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/files.el | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/files.el b/lisp/files.el index 89f6f9f44dc..c9114be55a9 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -6566,7 +6566,7 @@ Valid wildcards are '*', '?', '[abc]' and '[a-z]'." ls-lisp-support-shell-wildcards) (string-match (concat "[" wildcards "]") (file-name-directory dir)) (not (file-exists-p dir))) ; Prefer an existing file to wildcards. - (let ((regexp (format "\\`\\([^%s]+/\\)\\([^%s]*[%s].*\\)" + (let ((regexp (format "\\`\\([^%s]*/\\)\\([^%s]*[%s].*\\)" wildcards wildcards wildcards))) (string-match regexp dir) (cons (match-string 1 dir) (match-string 2 dir)))))) |