comparison lisp/dired-aux.el @ 30663:0e46bd381f99

(dired-do-create-files): On DOS/Windows, allow to rename a directory to a name that differs only by its letter case.
author Eli Zaretskii <eliz@gnu.org>
date Tue, 08 Aug 2000 10:51:51 +0000
parents ffb3f6c63ec0
children d559924db6ba
comparison
equal deleted inserted replaced
30662:13658e19c398 30663:0e46bd381f99
1230 (target (expand-file-name ; fluid variable inside dired-create-files 1230 (target (expand-file-name ; fluid variable inside dired-create-files
1231 (dired-mark-read-file-name 1231 (dired-mark-read-file-name
1232 (concat (if dired-one-file op1 operation) " %s to: ") 1232 (concat (if dired-one-file op1 operation) " %s to: ")
1233 (dired-dwim-target-directory) 1233 (dired-dwim-target-directory)
1234 op-symbol arg rfn-list))) 1234 op-symbol arg rfn-list)))
1235 (into-dir (cond ((null how-to) (file-directory-p target)) 1235 (into-dir (cond ((null how-to)
1236 ;; Allow DOS/Windows users to change the letter
1237 ;; case of a directory. If we don't test these
1238 ;; conditions up front, file-directory-p below
1239 ;; will return t because the filesystem is
1240 ;; case-insensitive, and Emacs will try to move
1241 ;; foo -> foo/foo, which fails.
1242 (if (and (memq system-type '(ms-dos windows-nt))
1243 (eq op-symbol 'move)
1244 dired-one-file
1245 (string= (downcase
1246 (expand-file-name (car fn-list)))
1247 (downcase
1248 (expand-file-name target)))
1249 (not (string=
1250 (file-name-nondirectory (car fn-list))
1251 (file-name-nondirectory target))))
1252 nil
1253 (file-directory-p target)))
1236 ((eq how-to t) nil) 1254 ((eq how-to t) nil)
1237 (t (funcall how-to target))))) 1255 (t (funcall how-to target)))))
1238 (if (and (consp into-dir) (functionp (car into-dir))) 1256 (if (and (consp into-dir) (functionp (car into-dir)))
1239 (apply (car into-dir) operation rfn-list fn-list target (cdr into-dir)) 1257 (apply (car into-dir) operation rfn-list fn-list target (cdr into-dir))
1240 (if (not (or dired-one-file into-dir)) 1258 (if (not (or dired-one-file into-dir))