Commit 106a57a4 authored by Eli Zaretskii's avatar Eli Zaretskii
Browse files

(file-name-invalid-regexp): Add control characters for DOS/Windows

as they are disallowed by the filesystem there.
parent 60e6659c
......@@ -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.")
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment