]> git.eshelyaron.com Git - emacs.git/commitdiff
(file-name-invalid-regexp): Add control characters for DOS/Windows
authorEli Zaretskii <eliz@gnu.org>
Sun, 14 Jun 1998 15:34:02 +0000 (15:34 +0000)
committerEli Zaretskii <eliz@gnu.org>
Sun, 14 Jun 1998 15:34:02 +0000 (15:34 +0000)
as they are disallowed by the filesystem there.

lisp/files.el

index 26f39169f8aace70d072b16797aebd2b765a89f0..6e7e889b8802ebf1741a14ce7b8cb28e9095f746 100644 (file)
@@ -174,11 +174,12 @@ If the buffer is visiting a new file, the value is nil.")
   (cond ((and (eq system-type 'ms-dos) (not (msdos-long-file-names)))
         (concat "\\(^\\([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
-                "[|<>\"?*]"))                    ; invalid characters
+                "[|<>\"?*\000-\031]"))           ; invalid characters
        (t "[\000]"))
   "Regexp recognizing file names which aren't allowed by the filesystem.")