Commit 15233548 authored by Eli Zaretskii's avatar Eli Zaretskii
Browse files

(make-auto-save-file-name): If long file names are not

supported, truncate the file name to DOS 8+3 limits before
generating an auto-save file name from it.
parent 66a863f0
2001-09-13 Eli Zaretskii <eliz@is.elta.co.il>
* files.el (make-auto-save-file-name): If long file names are not
supported on MS-DOS, truncate the file name to DOS 8+3 limits before
generating an auto-save file name from it.
2001-09-13 Gerd Moellmann <gerd@gnu.org>
 
* ps-print.el (ps-print-region, ps-print-region-with-faces)
......
......@@ -3264,7 +3264,12 @@ See also `auto-save-file-name-p'."
(if (and (eq system-type 'ms-dos)
(not (msdos-long-file-names)))
(let ((fn (file-name-nondirectory buffer-file-name)))
;; We truncate the file name to DOS 8+3 limits before
;; doing anything else, because the regexp passed to
;; string-match below cannot handle extensions longer than
;; 3 characters, multiple dots, and other atrocities.
(let ((fn (dos-8+3-filename
(file-name-nondirectory buffer-file-name))))
(string-match "\\`\\([^.]+\\)\\(\\.\\(..?\\)?.?\\|\\)\\'" fn)
(concat (file-name-directory buffer-file-name)
"#" (match-string 1 fn)
......
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