comparison lisp/dired.el @ 14387:9c3c642de62a

(dired-get-filename): When quoting " chars, handle all of them, including one at start of file name.
author Richard M. Stallman <rms@gnu.org>
date Sat, 27 Jan 1996 02:18:29 +0000
parents fbce2d55fec6
children 20f4c4a078b2
comparison
equal deleted inserted replaced
14386:4e5b28d28a5f 14387:9c3c642de62a
1197 (read 1197 (read
1198 (concat "\"" 1198 (concat "\""
1199 ;; some ls -b don't escape quotes, argh! 1199 ;; some ls -b don't escape quotes, argh!
1200 ;; This is not needed for GNU ls, though. 1200 ;; This is not needed for GNU ls, though.
1201 (or (dired-string-replace-match 1201 (or (dired-string-replace-match
1202 "\\([^\\]\\)\"" file "\\1\\\\\"") 1202 "\\([^\\]\\|\\`\\)\"" file "\\1\\\\\"" nil t)
1203 file) 1203 file)
1204 "\""))))) 1204 "\"")))))
1205 (if (eq localp 'no-dir) 1205 (if (eq localp 'no-dir)
1206 file 1206 file
1207 (and file (concat (dired-current-directory localp) file))))) 1207 (and file (concat (dired-current-directory localp) file)))))