From 9959c16e4f83ba4798ffa089261d8f4b0a30361a Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Wed, 15 Jul 1998 10:21:04 +0000 Subject: [PATCH] (file-name-invalid-regexp): Fix the part which handles colons in file names. --- lisp/files.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/files.el b/lisp/files.el index 1bd0ac57219..cb7336f5d28 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -172,13 +172,13 @@ If the buffer is visiting a new file, the value is nil.") (defvar file-name-invalid-regexp (cond ((and (eq system-type 'ms-dos) (not (msdos-long-file-names))) - (concat "\\(^\\([A-z]:\\)?/?.*:\\)\\|" ; colon except after drive + (concat "^\\([^A-Z[-`a-z]\\|..+\\)?:\\|" ; colon except after drive "[+, ;=|<>\"?*]\\|\\[\\|\\]\\|" ; invalid characters "[\000-\031]|" ; control characters "\\(/\\.\\.?[^/]\\)\\|" ; leading dots "\\(/[^/.]+\\.[^/.]*\\.\\)")) ; more than a single dot ((memq system-type '(ms-dos windows-nt)) - (concat "\\(^\\([A-z]:\\)?/?.*:\\)\\|" ; colon except after drive + (concat "^\\([^A-Z[-`a-z]\\|..+\\)?:\\|" ; colon except after drive "[|<>\"?*\000-\031]")) ; invalid characters (t "[\000]")) "Regexp recognizing file names which aren't allowed by the filesystem.") -- 2.39.2