mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-12-17 10:06:13 +00:00
(convert-standard-filename): Test msdos-long-file-names.
Return "." or ".." unchanged.
This commit is contained in:
parent
54bd13807d
commit
9c7771996c
@ -49,16 +49,15 @@
|
||||
This function's standard definition is trivial; it just returns the argument.
|
||||
However, on some systems, the function is redefined
|
||||
with a definition that really does change some file names."
|
||||
(if (or (msdos-long-file-names)
|
||||
(not (stringp filename))
|
||||
(member (file-name-nondirectory filename) '("" "." "..")))
|
||||
filename
|
||||
(let* ((dir (file-name-directory filename))
|
||||
(string (copy-sequence (file-name-nondirectory filename)))
|
||||
(lastchar (aref string (1- (length string))))
|
||||
i firstdot)
|
||||
;; If the argument is empty, just return it.
|
||||
(if (or (not (stringp filename))
|
||||
(string= filename "")
|
||||
(string= string ""))
|
||||
filename
|
||||
(progn
|
||||
;; Change a leading period to a leading underscore.
|
||||
(if (= (aref string 0) ?.)
|
||||
(aset string 0 ?_))
|
||||
@ -93,7 +92,7 @@ with a definition that really does change some file names."
|
||||
;; make sure the munged name ends with it also.
|
||||
(if (equal lastchar ?~)
|
||||
(aset string (1- (length string)) lastchar))
|
||||
(concat dir string)))))
|
||||
(concat dir string))))
|
||||
|
||||
(defvar file-name-buffer-file-type-alist
|
||||
'(
|
||||
|
Loading…
Reference in New Issue
Block a user